|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.techtrader.modules.tools.bytecode.BCEntity
Abstract superclass for all complex bytecode entities. All bytecode entities contain attributes and are able to access the constant pool.
Constructor Summary | |
BCEntity()
|
Method Summary | |
Attribute |
addAttribute(String name)
Add an attribute of the given type. |
void |
clearAttributes()
Clear all attributes from this entity. |
Attribute |
getAttribute(String name)
Return the attribute with the given name. |
Attribute[] |
getAttributes()
Get all the attributes owned by this entity. |
Attribute[] |
getAttributes(String name)
Returns all attributes with the given name. |
abstract ConstantPool |
getPool()
Return the constant pool for the current class. |
Attribute |
importAttribute(Attribute attr)
Import an attribute from another entity, or make a copy of one on this entity. |
void |
importAttributes(BCEntity other)
Import all attributes from another entity. |
protected void |
readAttributes(DataInput in)
Clears the attribute list and rebuilds it from the given stream. |
boolean |
removeAttribute(Attribute attribute)
Remove the given attribute. |
boolean |
removeAttribute(String name)
Remove all attributes with the given name from the list. |
void |
visitAttributes(BCVisitor visit)
Convenience method to be called by BCEntities when being visited by a BCVisitor; this method will allow the visitor to visit all attributes of this entity. |
protected void |
writeAttributes(DataOutput out)
Writes all the owned attributes to the given stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public BCEntity()
Method Detail |
public abstract ConstantPool getPool()
public Attribute[] getAttributes()
public Attribute getAttribute(String name)
public Attribute[] getAttributes(String name)
public Attribute importAttribute(Attribute attr)
public void importAttributes(BCEntity other)
public Attribute addAttribute(String name)
public void clearAttributes()
public boolean removeAttribute(String name)
public boolean removeAttribute(Attribute attribute)
protected void readAttributes(DataInput in) throws IOException
protected void writeAttributes(DataOutput out) throws IOException
public void visitAttributes(BCVisitor visit)
|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |