|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.techtrader.modules.tools.bytecode
Class Attribute

java.lang.Objectcom.techtrader.modules.tools.bytecode.BCEntity
com.techtrader.modules.tools.bytecode.Attribute
- All Implemented Interfaces:
- Constants, com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor
- Direct Known Subclasses:
- Code, ConstantValueAttribute, DeprecatedAttribute, ExceptionsAttribute, InnerClassesAttribute, LineNumberTableAttribute, LocalVariableTableAttribute, SourceFileAttribute, SyntheticAttribute, UnknownAttribute
- public abstract class Attribute
- extends BCEntity
- implements Constants, com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor
- extends BCEntity
Representation of an attribute in a .class file. Attributes are used to represent constants and the code of methods, among other things. All attributes contain at a minimum a name, which is immutable, as it determines the attribute's type.
| Field Summary | |
protected int |
_nameIndex
|
protected BCEntity |
_owner
|
| Fields inherited from class com.techtrader.modules.tools.bytecode.BCEntity |
|
| Constructor Summary | |
protected |
Attribute(int nameIndex,
BCEntity owner)
Protected Constructor. |
| Method Summary | |
protected void |
copy(Attribute other)
Copy the information from the given attribute to this one. |
protected static Attribute |
createAttribute(java.lang.String name,
BCEntity owner)
Create an attribute of the appropriate type based on the the attribute name. |
int |
getLength()
Return the length of the .class representation of this attribute, in bytes. |
java.lang.String |
getName()
Return the name of this attribute. |
int |
getNameIndex()
Return the constant pool index of the UTF entry holding the name of this attribute. |
BCEntity |
getOwner()
Each Attribute references the entity that owns it. |
com.techtrader.modules.tools.bytecode.lowlevel.ConstantPool |
getPool()
Implementation of the BCEntity abstract method; delegates to the owning entity. |
protected void |
invalidate()
Invalidate this Attribute. |
protected void |
readData(java.io.DataInput in,
int length)
Should be overridden by subclasses to read their internal data from the given stream, up to length bytes, excluding the name index. |
protected void |
writeData(java.io.DataOutput out,
int length)
Should be overridden by subclasses to write their internal data to the given stream, up to length bytes, excluding the name index. |
| Methods inherited from class com.techtrader.modules.tools.bytecode.BCEntity |
addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, importAttribute, importAttributes, readAttributes, removeAttribute, removeAttribute, visitAttributes, writeAttributes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor |
acceptVisit |
| Field Detail |
_nameIndex
protected int _nameIndex
_owner
protected BCEntity _owner
| Constructor Detail |
Attribute
protected Attribute(int nameIndex,
BCEntity owner)
- Protected Constructor.
| Method Detail |
createAttribute
protected static Attribute createAttribute(java.lang.String name, BCEntity owner)
- Create an attribute of the appropriate type based on the
the attribute name.
invalidate
protected void invalidate()
- Invalidate this Attribute.
getOwner
public BCEntity getOwner()
- Each Attribute references the entity that owns it.
getNameIndex
public int getNameIndex()
- Return the constant pool index of the UTF entry holding the name
of this attribute.
getName
public java.lang.String getName()
- Return the name of this attribute.
getPool
public com.techtrader.modules.tools.bytecode.lowlevel.ConstantPool getPool()
- Implementation of the BCEntity abstract method; delegates to the
owning entity.
getLength
public int getLength()
- Return the length of the .class representation of this attribute,
in bytes.
copy
protected void copy(Attribute other)
- Copy the information from the given attribute to this one.
readData
protected void readData(java.io.DataInput in, int length) throws java.io.IOException
- Should be overridden by subclasses to read their internal data from
the given stream, up to length bytes, excluding the name index.
writeData
protected void writeData(java.io.DataOutput out, int length) throws java.io.IOException
- Should be overridden by subclasses to write their internal data to
the given stream, up to length bytes, excluding the name index.
|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC