Package serp.bytecode
Class Attribute
java.lang.Object
serp.bytecode.Attributes
serp.bytecode.Attribute
- All Implemented Interfaces:
BCEntity,VisitAcceptor
- Direct Known Subclasses:
Annotations,BootstrapMethods,Code,ConstantValue,Deprecated,Exceptions,InnerClasses,LineNumberTable,LocalTable,SourceFile,Synthetic,UnknownAttribute
In bytecode attributes are used to represent anything that is not
part of the class structure. This includes the source file name, code of
methods, the line number table, etc. All attributes contain at a minimum
an immutable name that also determines the attribute's type.
- Author:
- Abe White
-
Method Summary
Modifier and TypeMethodDescriptionReturn the class loader to use when loading related classes.getName()Return the name of this attribute.intReturn the index in theConstantPoolof theUTF8Entryholding the name of this attribute.getOwner()Return theAttributesthat owns this attribute.getPool()Return the constant pool of the current class.Return the project of the current class.booleanisValid()Return false if this entity has been removed from its parent; in this case the results of any operations on the entity are undefined.Methods inherited from class serp.bytecode.Attributes
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface serp.bytecode.visitor.VisitAcceptor
acceptVisit
-
Method Details
-
getOwner
Return theAttributesthat owns this attribute. The entity might be aBCClass,BCField,BCMethod, or other attribute. -
getNameIndex
public int getNameIndex()Return the index in theConstantPoolof theUTF8Entryholding the name of this attribute. -
getName
Return the name of this attribute. -
getProject
Description copied from interface:BCEntityReturn the project of the current class.- Specified by:
getProjectin interfaceBCEntity
-
getPool
Description copied from interface:BCEntityReturn the constant pool of the current class. -
getClassLoader
Description copied from interface:BCEntityReturn the class loader to use when loading related classes.- Specified by:
getClassLoaderin interfaceBCEntity
-
isValid
public boolean isValid()Description copied from interface:BCEntityReturn false if this entity has been removed from its parent; in this case the results of any operations on the entity are undefined.
-