Class ModulePackagesAttribute
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileAttribute
org.aspectj.org.eclipse.jdt.internal.core.util.ModulePackagesAttribute
- All Implemented Interfaces:
IClassFileAttribute, IModulePackagesAttribute
Default implementation of IModulePackagesAttribute
-
Field Summary
Fields inherited from class ClassFileAttribute
NO_ATTRIBUTES -
Constructor Summary
ConstructorsConstructorDescriptionModulePackagesAttribute(byte[] classFileBytes, IConstantPool constantPool, int offset) Constructor for ModulePackagesAttribute. -
Method Summary
Modifier and TypeMethodDescriptionint[]Answer back the array of package indices.char[][]Answer back the names of packages.intAnswer back the number of packages exported or opened.Methods inherited from class ClassFileAttribute
getAttributeLength, getAttributeName, getAttributeNameIndexModifier and TypeMethodDescriptionlongAnswer back the attribute length as specified in the JVM specifications.char[]Answer back the attribute name as specified in the JVM specifications.intAnswer back the attribute name index in the constant pool as specified in the JVM specifications.Methods inherited from class ClassFileStruct
doubleAt, floatAt, i1At, i2At, i4At, i8At, u1At, u2At, u4At, utf8AtModifier and TypeMethodDescriptionprotected doubledoubleAt(byte[] reference, int relativeOffset, int structOffset) protected floatfloatAt(byte[] reference, int relativeOffset, int structOffset) protected inti1At(byte[] reference, int relativeOffset, int structOffset) protected inti2At(byte[] reference, int relativeOffset, int structOffset) protected inti4At(byte[] reference, int relativeOffset, int structOffset) protected longi8At(byte[] reference, int relativeOffset, int structOffset) protected intu1At(byte[] reference, int relativeOffset, int structOffset) protected intu2At(byte[] reference, int relativeOffset, int structOffset) protected intu4At(byte[] reference, int relativeOffset, int structOffset) Returns an 32 bit integer created of 4 bytes.protected char[]utf8At(byte[] reference, int relativeOffset, int structOffset, int bytesAvailable)
-
Constructor Details
-
ModulePackagesAttribute
public ModulePackagesAttribute(byte[] classFileBytes, IConstantPool constantPool, int offset) throws ClassFormatException Constructor for ModulePackagesAttribute.- Throws:
ClassFormatException
-
-
Method Details
-
getPackagesCount
public int getPackagesCount()Description copied from interface:IModulePackagesAttributeAnswer back the number of packages exported or opened.- Specified by:
getPackagesCountin interfaceIModulePackagesAttribute- Returns:
- the number of packages exported or opened
-
getPackageIndices
public int[] getPackageIndices()Description copied from interface:IModulePackagesAttributeAnswer back the array of package indices.- Specified by:
getPackageIndicesin interfaceIModulePackagesAttribute- Returns:
- the array of package indices.
-
getPackageNames
public char[][] getPackageNames()Description copied from interface:IModulePackagesAttributeAnswer back the names of packages. Answers an empty collection if none.- Specified by:
getPackageNamesin interfaceIModulePackagesAttribute- Returns:
- the names of packages
-