Examples of ConstantPool


Examples of org.apache.bcel.classfile.ConstantPool

      return;

    String className = cls.getName();
    // 0. Get the BCEL constant pool object
    JavaClass bcelClass = HotSwapAspectInterfaceImpl.getBCELClassDefinition( cls );
    ConstantPool constantPool = bcelClass.getConstantPool();
    Constant[] constants = constantPool.getConstantPool();

    // Remember the class, so it doesn't get scanned again.
    scannedConstantPools.put( cls, dummyValue );

    // 1. Iterate through all constant pool entries
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPool

        // right we have a good looking class file.
        int minorVersion = classStream.readUnsignedShort();
        int majorVersion = classStream.readUnsignedShort();

        // read the constant pool in and resolve it
        constantPool = new ConstantPool();

        constantPool.read(classStream);
        constantPool.resolve();

        int accessFlags = classStream.readUnsignedShort();
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.ConstantPool

    }
  }

// TODO setting the constant value is a mess...
  public void setValue(int index) {
    ConstantPool cp = this.cp;
    Constant c = cp.getConstant(index);
    value = ((ConstantObject) c).getConstantValue(cp);
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.codegen.ConstantPool

    // default constructor for subclasses
  }
 
  public ClassFile(SourceTypeBinding typeBinding) {
    // default constructor for subclasses
    this.constantPool = new ConstantPool(this);
    final CompilerOptions options = typeBinding.scope.compilerOptions();
    this.targetJDK = options.targetJDK;
    this.produceAttributes = options.produceDebugAttributes;
    this.referenceBinding = typeBinding;
    if (this.targetJDK >= ClassFileConstants.JDK1_6) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.ConstantPool

  this.header[this.headerOffset++] = (byte) (targetVersion >> 24); // major high
  this.header[this.headerOffset++] = (byte) (targetVersion >> 16); // major low

  this.constantPoolOffset = this.headerOffset;
  this.headerOffset += 2;
  this.constantPool = new ConstantPool(this);
  int accessFlags = aType.getAccessFlags();

  if (!aType.isInterface()) { // class or enum
    accessFlags |= ClassFileConstants.AccSuper;
  }
View Full Code Here

Examples of org.jreversepro.reflect.ConstantPool

   *           Thrown if error in stream of bytes containing the class file.
   */
  public ClassInfo parseInputStream(DataInputStream dis, String pathToClass)
      throws IOException, ClassParserException {

    ConstantPool cp = AbstractClassFileParser.readConstantPool(dis);
    ClassInfo clazz = new ClassInfo(cp);
    short access = AbstractClassFileParser.readAccess(dis);

    clazz.setAccess(access);

    // <p>
    // For Example , a class by name <code>JClassParser</code> in the
    // package
    // <code>Heart</code> would be saved as: <code>Heart/JClassParser</code>
    // </p>.
    short thisClassIndex = AbstractClassFileParser.readThisClassIndex(dis);
    clazz.setThisClass(cp.getClassName(thisClassIndex));

    short superClassIndex = AbstractClassFileParser.readSuperClassIndex(dis);
    clazz.setSuperClass(cp.getClassName(superClassIndex));

    List<String> interfaceNames = AbstractClassFileParser.readInterfaces(dis,
        cp);
    clazz.setInterfaces(interfaceNames);

View Full Code Here

Examples of tv.porst.swfretools.parser.structures.ConstantPool

    final Map<MethodInfo, ResolvedMethod> methodMapping = new HashMap<MethodInfo, ResolvedMethod>();

    final MethodInfoList methodInfos = data.getMethodInfos();
    final MethodBodyList methodBodies = data.getMethodBodies();

    final ConstantPool constantPool = data.getConstantPool();
    final StringInfoList constantStrings = constantPool.getStrings();
    final MultinameInfoList multiNames = constantPool.getMultinames();
    final NamespaceInfoList namespaces = constantPool.getNamespaces();

    // In the first round we are using the existing mapping between method bodies
    // and method information fields to create the inverse mapping.
    for (final MethodBody methodBody : methodBodies) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.