Package org.aspectj.org.eclipse.jdt.core.util

Examples of org.aspectj.org.eclipse.jdt.core.util.IConstantPoolEntry


      int offset) throws ClassFormatException {
   
    final int index = u2At(classFileBytes, 0, offset);
    this.typeIndex = index;
    if (index != 0) {
      IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      this.typeName = constantPoolEntry.getUtf8Value();
    } else {
      throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
    }
    final int length = u2At(classFileBytes, 2, offset);
    this.componentsNumber = length;
View Full Code Here


    throws ClassFormatException {
    this.innerClassNameIndex = u2At(classFileBytes, 0, offset);
    this.outerClassNameIndex = u2At(classFileBytes, 2, offset);
    this.innerNameIndex = u2At(classFileBytes, 4, offset);
    this.accessFlags = u2At(classFileBytes, 6, offset);
    IConstantPoolEntry constantPoolEntry;
    if (this.innerClassNameIndex != 0) {
      constantPoolEntry = constantPool.decodeEntry(this.innerClassNameIndex);
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Class) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      this.innerClassName = constantPoolEntry.getClassInfoName();
    }
    if (outerClassNameIndex != 0) {
      constantPoolEntry = constantPool.decodeEntry(this.outerClassNameIndex);
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Class) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      this.outerClassName = constantPoolEntry.getClassInfoName();
    }
    if (innerNameIndex != 0) {
      constantPoolEntry = constantPool.decodeEntry(this.innerNameIndex);
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      this.innerName = constantPoolEntry.getUtf8Value();
    }
  }
View Full Code Here

    IConstantPool constantPool,
    int offset)
    throws ClassFormatException {
    super(classFileBytes, constantPool, offset);
    this.sourceFileIndex = u2At(classFileBytes, 6, offset);
    IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.sourceFileIndex);
    if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
      throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
    }
    this.sourceFileName = constantPoolEntry.getUtf8Value();
  }
View Full Code Here

    this.startPC = u2At(classFileBytes, 0, offset);
    this.endPC = u2At(classFileBytes, 2, offset);
    this.handlerPC = u2At(classFileBytes, 4, offset);
    this.catchTypeIndex = u2At(classFileBytes, 6, offset);
    if (this.catchTypeIndex != 0) {
      IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.catchTypeIndex);
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Class) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      this.catchType = constantPoolEntry.getClassInfoName();
    }
  }
View Full Code Here

    if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
      this.isSynthetic = true;
    }
   
    this.nameIndex = u2At(classFileBytes, 2, offset);
    IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
    if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
      throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
    }
    this.name = constantPoolEntry.getUtf8Value();
   
    this.descriptorIndex = u2At(classFileBytes, 4, offset);
    constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
    if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
      throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
    }
    this.descriptor = constantPoolEntry.getUtf8Value();
   
    this.attributesCount = u2At(classFileBytes, 6, offset);
    this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
    if (this.attributesCount != 0) {
      if (no_code_attribute && !isAbstract() && !isNative()) {
        if (this.attributesCount != 1) {
          this.attributes = new IClassFileAttribute[this.attributesCount - 1];
        }
      } else {
        this.attributes = new IClassFileAttribute[this.attributesCount];
      }
    }
    int attributesIndex = 0;
    int readOffset = 8;
    for (int i = 0; i < this.attributesCount; i++) {
      constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      char[] attributeName = constantPoolEntry.getUtf8Value();
      if (equals(attributeName, IAttributeNamesConstants.DEPRECATED)) {
        this.isDeprecated = true;
        this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
      } else if (equals(attributeName, IAttributeNamesConstants.SYNTHETIC)) {
        this.isSynthetic = true;
View Full Code Here

  private char[] attributeName;
 
  public ClassFileAttribute(byte[] classFileBytes, IConstantPool constantPool, int offset) throws ClassFormatException {
    this.attributeNameIndex = u2At(classFileBytes, 0, offset);
    this.attributeLength = u4At(classFileBytes, 2, offset);
    IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.attributeNameIndex);
    if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
      throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
    }
    this.attributeName = constantPoolEntry.getUtf8Value();
  }
View Full Code Here

      this.startPC = u2At(classFileBytes, 0, offset);
      this.length = u2At(classFileBytes, 2, offset);
      this.nameIndex = u2At(classFileBytes, 4, offset);
      this.descriptorIndex = u2At(classFileBytes, 6, offset);
      this.index = u2At(classFileBytes, 8, offset);
      IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      this.name = constantPoolEntry.getUtf8Value();
      constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
      if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
        throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
      }
      this.descriptor = constantPoolEntry.getUtf8Value();
    }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.core.util.IConstantPoolEntry

Copyright © 2018 www.massapicom. 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.