Tabnine Logo
ConstantPoolGen.addFieldref
Code IndexAdd Tabnine to your IDE (free)

How to use
addFieldref
method
in
org.apache.bcel.generic.ConstantPoolGen

Best Java code snippets using org.apache.bcel.generic.ConstantPoolGen.addFieldref (Showing top 20 results out of 315)

origin: spotbugs/spotbugs

public int getIndex(FieldDescriptor f) {
  Integer i = addedFields.get(f);
  if (i != null) {
    return i;
  }
  int index = cpg.addFieldref(f.getSlashedClassName(), f.getName(), f.getSignature());
  addedFields.put(f, index);
  return index;
}
public void optimize(InstructionList instructionList) {
origin: xalan/xalan

/**
 * Translates an object of this type to its unboxed representation.
 */ 
public void translateUnBox(ClassGenerator classGen,
        MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
            NODE_FIELD,
            NODE_FIELD_SIG)));
}
origin: xalan/xalan

  /**
   * Generates code that loads the array that will contain the character
   * data represented by this Text node, followed by the offset of the
   * data from the start of the array, and then the length of the data.
   *
   * The pre-condition to calling this method is that
   * canLoadAsArrayOffsetLength() returns true.
   * @see #canLoadArrayOffsetLength()
   */
  public void loadAsArrayOffsetLength(ClassGenerator classGen,
                    MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();
    final XSLTC xsltc = classGen.getParser().getXSLTC();

    // The XSLTC object keeps track of character data
    // that is to be stored in char arrays.
    final int offset = xsltc.addCharacterData(_text);
    final int length = _text.length();
    String charDataFieldName =
      STATIC_CHAR_DATA_FIELD + (xsltc.getCharacterDataCount()-1);

    il.append(new GETSTATIC(cpg.addFieldref(xsltc.getClassName(),
                    charDataFieldName,
                    STATIC_CHAR_DATA_FIELD_SIG)));
    il.append(new PUSH(cpg, offset));
    il.append(new PUSH(cpg, _text.length()));
  }
}
origin: xalan/xalan

il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
            NAMES_INDEX,
            NAMES_INDEX_SIG)));
il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
            URIS_INDEX,
            URIS_INDEX_SIG)));
il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
            TYPES_INDEX,
            TYPES_INDEX_SIG)));
il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
            NAMESPACE_INDEX,
            NAMESPACE_INDEX_SIG)));
origin: xalan/xalan

il.append(new GETSTATIC(cpg.addFieldref(_className,
                    STATIC_NAMES_ARRAY_FIELD,
                    NAMES_INDEX_SIG)));
il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                    NAMES_INDEX,
                    NAMES_INDEX_SIG)));
il.append(new GETSTATIC(cpg.addFieldref(_className,
                    STATIC_URIS_ARRAY_FIELD,
                    URIS_INDEX_SIG)));
il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                    URIS_INDEX,
                    URIS_INDEX_SIG)));
il.append(new GETSTATIC(cpg.addFieldref(_className,
                    STATIC_TYPES_ARRAY_FIELD,
                    TYPES_INDEX_SIG)));
il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                    TYPES_INDEX,
                    TYPES_INDEX_SIG)));
il.append(new GETSTATIC(cpg.addFieldref(_className,
                    STATIC_NAMESPACE_ARRAY_FIELD,
                    NAMESPACE_INDEX_SIG)));
il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                    NAMESPACE_INDEX,
                    NAMESPACE_INDEX_SIG)));
il.append(classGen.loadTranslet());
origin: xalan/xalan

il.append(ALOAD_0);
il.append(new GETFIELD(
  cpg.addFieldref(variableClosure.getInnerClassName(), 
  var.getEscapedName(), varType.toSignature())));
  cpg.addFieldref(_className, var.getEscapedName(), 
  varType.toSignature())));
origin: xalan/xalan

         Util.getJCRefType(NODE_ITERATOR_SIG),
         null, null);
field = cpg.addFieldref(NODE_COUNTER, "_iterator",
      ITERATOR_FIELD_SIG);
       Util.getJCRefType(TRANSLET_SIG),
       null, null);
field = cpg.addFieldref(NODE_COUNTER, "_translet",
      "Lorg/apache/xalan/xsltc/Translet;");
         Util.getJCRefType(DOM_INTF_SIG),
         null, null);
field = cpg.addFieldref(_className, "_document", DOM_INTF_SIG);
origin: xalan/xalan

  il.append(ALOAD_0);
  il.append(new GETFIELD(
  cpg.addFieldref(variableClosure.getInnerClassName(), 
    name, signature)));
il.append(new CHECKCAST(cpg.addClass(className)));
il.append(new GETFIELD(cpg.addFieldref(className,name,signature)));
origin: xalan/xalan

  il.append(ALOAD_0);
  il.append(new GETFIELD(
  cpg.addFieldref(variableClosure.getInnerClassName(), 
    name, signature)));
il.append(new CHECKCAST(cpg.addClass(className)));
il.append(new GETFIELD(cpg.addFieldref(className,name,signature)));
origin: xalan/xalan

il.append(new PUTFIELD(cpg.addFieldref(classGen.getClassName(),
            name, signature)));
origin: xalan/xalan

final int ac = argumentCount();
final int domField = cpg.addFieldref(classGen.getClassName(),
                   DOM_FIELD,
                   DOM_INTF_SIG);
origin: xalan/xalan

il.append(filterGen.loadTranslet());
il.append(new CHECKCAST(cpg.addClass(className)));
il.append(new GETFIELD(cpg.addFieldref(className,
            DOM_FIELD, DOM_INTF_SIG)));
local.setStart(il.append(new ASTORE(local.getIndex())));
origin: xalan/xalan

  il.append(new GETSTATIC(cpg.addFieldref(LOCALE_CLASS, "US",
                      LOCALE_SIG)));
il.append(new INVOKESPECIAL(init));
origin: xalan/xalan

il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                    "stringValueHandler",
                    STRING_VALUE_HANDLER_SIG)));
origin: xalan/xalan

fieldIndexes[_level] = cpg.addFieldref(classGen.getClassName(), 
          FieldNames[_level],
          NODE_COUNTER_SIG);
origin: xalan/xalan

il.append(new GETFIELD(cpg.addFieldref(className, "_dom",
          DOM_INTF_SIG)));
origin: xalan/xalan

il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
            "stringValueHandler",
            STRING_VALUE_HANDLER_SIG)));
origin: xalan/xalan

  il.append(new CHECKCAST(cpg.addClass(className)));
il.append(new PUTFIELD(cpg.addFieldref(classGen.getClassName(),
            name, signature)));
origin: xalan/xalan

il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
          "stringValueHandler",
          STRING_VALUE_HANDLER_SIG)));
origin: xalan/xalan

   null, cpg.getConstantPool());
classGen.addField(iterator);
iteratorIndex = cpg.addFieldref(classGen.getClassName(), 
        iteratorName,
        NODE_ITERATOR_SIG);
org.apache.bcel.genericConstantPoolGenaddFieldref

Javadoc

Add a new Fieldref constant to the ConstantPool, if it is not already in there.

Popular methods of ConstantPoolGen

  • addClass
    Add a new Class reference to the ConstantPool for a given type.
  • addMethodref
  • getConstantPool
  • <init>
    Initialize with given array of constants.
  • addUtf8
    Add a new Utf8 constant to the ConstantPool, if it is not already in there.
  • addInterfaceMethodref
  • addString
    Add a new String constant to the ConstantPool, if it is not already in there.
  • lookupUtf8
    Look for ConstantUtf8 in ConstantPool.
  • addDouble
    Add a new double constant to the ConstantPool, if it is not already in there.
  • addNameAndType
    Add a new NameAndType constant to the ConstantPool if it is not already in there.
  • getConstant
  • getFinalConstantPool
  • getConstant,
  • getFinalConstantPool,
  • lookupClass,
  • lookupDouble,
  • lookupFloat,
  • lookupInteger,
  • lookupLong,
  • lookupMethodref,
  • addArrayClass

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now