當前位置: 首頁>>代碼示例>>Java>>正文


Java SignatureAttribute類代碼示例

本文整理匯總了Java中scouter.javassist.bytecode.SignatureAttribute的典型用法代碼示例。如果您正苦於以下問題:Java SignatureAttribute類的具體用法?Java SignatureAttribute怎麽用?Java SignatureAttribute使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SignatureAttribute類屬於scouter.javassist.bytecode包,在下文中一共展示了SignatureAttribute類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getValue

import scouter.javassist.bytecode.SignatureAttribute; //導入依賴的package包/類
/**
 * Obtains the value of the member.
 *
 * @return fully-qualified class name.
 */
public String getValue() {
    String v = cp.getUtf8Info(valueIndex);
    try {
        return SignatureAttribute.toTypeSignature(v).jvmTypeName();
    } catch (BadBytecode e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:scouter-project,項目名稱:bytescope,代碼行數:14,代碼來源:ClassMemberValue.java

示例2: getGenericSignature

import scouter.javassist.bytecode.SignatureAttribute; //導入依賴的package包/類
public String getGenericSignature() {
    SignatureAttribute sa
        = (SignatureAttribute)getClassFile2().getAttribute(SignatureAttribute.tag);
    return sa == null ? null : sa.getSignature();
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:6,代碼來源:CtClassType.java

示例3: setGenericSignature

import scouter.javassist.bytecode.SignatureAttribute; //導入依賴的package包/類
public void setGenericSignature(String sig) {
    ClassFile cf = getClassFile();
    SignatureAttribute sa = new SignatureAttribute(cf.getConstPool(), sig);
    cf.addAttribute(sa);
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:6,代碼來源:CtClassType.java

示例4: getGenericSignature

import scouter.javassist.bytecode.SignatureAttribute; //導入依賴的package包/類
/**
 * Returns the generic signature of the field.
 * It represents a type including type variables.
 *
 * @see SignatureAttribute#toFieldSignature(String)
 * @since 3.17
 */
public String getGenericSignature() {
    SignatureAttribute sa
        = (SignatureAttribute)fieldInfo.getAttribute(SignatureAttribute.tag);
    return sa == null ? null : sa.getSignature();
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:13,代碼來源:CtField.java

示例5: setGenericSignature

import scouter.javassist.bytecode.SignatureAttribute; //導入依賴的package包/類
/**
 * Set the generic signature of the field.
 * It represents a type including type variables.
 * See {@link CtClass#setGenericSignature(String)}
 * for a code sample.
 *
 * @param sig       a new generic signature.
 * @see SignatureAttribute.ObjectType#encode()
 * @since 3.17
 */
public void setGenericSignature(String sig) {
    declaringClass.checkModify();
    fieldInfo.addAttribute(new SignatureAttribute(fieldInfo.getConstPool(), sig));
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:15,代碼來源:CtField.java

示例6: getGenericSignature

import scouter.javassist.bytecode.SignatureAttribute; //導入依賴的package包/類
/**
 * Returns the generic signature of the method.
 * It represents parameter types including type variables.
 *
 * @see SignatureAttribute#toMethodSignature(String)
 * @since 3.17
 */
public String getGenericSignature() {
    SignatureAttribute sa
        = (SignatureAttribute)methodInfo.getAttribute(SignatureAttribute.tag);
    return sa == null ? null : sa.getSignature();
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:13,代碼來源:CtBehavior.java

示例7: setGenericSignature

import scouter.javassist.bytecode.SignatureAttribute; //導入依賴的package包/類
/**
 * Set the generic signature of the method.
 * It represents parameter types including type variables.
 * See {@link CtClass#setGenericSignature(String)}
 * for a code sample.
 *
 * @param sig       a new generic signature.
 * @see SignatureAttribute.MethodSignature#encode()
 * @since 3.17
 */
public void setGenericSignature(String sig) {
    declaringClass.checkModify();
    methodInfo.addAttribute(new SignatureAttribute(methodInfo.getConstPool(), sig));
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:15,代碼來源:CtBehavior.java


注:本文中的scouter.javassist.bytecode.SignatureAttribute類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。