本文整理汇总了Java中scouter.javassist.bytecode.ConstPool.getMethodrefType方法的典型用法代码示例。如果您正苦于以下问题:Java ConstPool.getMethodrefType方法的具体用法?Java ConstPool.getMethodrefType怎么用?Java ConstPool.getMethodrefType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scouter.javassist.bytecode.ConstPool
的用法示例。
在下文中一共展示了ConstPool.getMethodrefType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConstructor
import scouter.javassist.bytecode.ConstPool; //导入方法依赖的package包/类
/**
* Returns the constructor called for creating the object.
*/
public CtConstructor getConstructor() throws NotFoundException {
ConstPool cp = getConstPool();
int index = iterator.u16bitAt(currentPos + 1);
String desc = cp.getMethodrefType(index);
return getCtClass().getConstructor(desc);
}
示例2: getSignature
import scouter.javassist.bytecode.ConstPool; //导入方法依赖的package包/类
/**
* Get the signature of the constructor
*
* The signature is represented by a character string
* called method descriptor, which is defined in the JVM specification.
*
* @see CtBehavior#getSignature()
* @see Descriptor
* @return the signature
*/
public String getSignature() {
ConstPool constPool = getConstPool();
int methodIndex = iterator.u16bitAt(currentPos + 1); // constructor
return constPool.getMethodrefType(methodIndex);
}