Java Code Examples for com.sun.org.apache.bcel.internal.classfile.ConstantPool#constantToString()

The following examples show how to use com.sun.org.apache.bcel.internal.classfile.ConstantPool#constantToString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InvokeInstruction.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
@Override
public String toString( final ConstantPool cp ) {
    final Constant c = cp.getConstant(super.getIndex());
    final StringTokenizer tok = new StringTokenizer(cp.constantToString(c));
    return Const.getOpcodeName(super.getOpcode()) + " " + tok.nextToken().replace('.', '/')
            + tok.nextToken();
}
 
Example 2
Source File: CPInstruction.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
@Override
public String toString( final ConstantPool cp ) {
    final Constant c = cp.getConstant(index);
    String str = cp.constantToString(c);
    if (c instanceof ConstantClass) {
        str = str.replace('.', '/');
    }
    return com.sun.org.apache.bcel.internal.Const.getOpcodeName(super.getOpcode()) + " " + str;
}
 
Example 3
Source File: FieldInstruction.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 4
Source File: FieldInstruction.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 5
Source File: FieldInstruction.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 6
Source File: FieldInstruction.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 7
Source File: FieldInstruction.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 8
Source File: FieldInstruction.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 9
Source File: FieldInstruction.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
@Override
public String toString( final ConstantPool cp ) {
    return com.sun.org.apache.bcel.internal.Const.getOpcodeName(super.getOpcode()) + " "
            + cp.constantToString(super.getIndex(), com.sun.org.apache.bcel.internal.Const.CONSTANT_Fieldref);
}
 
Example 10
Source File: FieldInstruction.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 11
Source File: FieldInstruction.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 12
Source File: FieldInstruction.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}
 
Example 13
Source File: FieldInstruction.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @return mnemonic for instruction with symbolic references resolved
 */
public String toString(ConstantPool cp) {
  return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
    cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);
}