|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.rice.cs.cunit.classFile.attributes.AAttributeInfo edu.rice.cs.cunit.classFile.attributes.InstrumentationAttributeInfo
public class InstrumentationAttributeInfo
Represents the Instrumentation attribute in a class file.
Field Summary | |
---|---|
static java.lang.String |
NAME
Name of this attribute. |
Fields inherited from class edu.rice.cs.cunit.classFile.attributes.AAttributeInfo |
---|
_constantPool, _data, _name |
Constructor Summary | |
---|---|
InstrumentationAttributeInfo(AUTFPoolInfo name,
byte[] data,
ConstantPool cp)
Constructor. |
Method Summary | ||
---|---|---|
static void |
addInstrumentationAttributeInfo(ClassFile cf,
java.util.Collection<java.lang.String> itors)
Add the Instrumentation attribute with the given list of instrumentors to the class file. |
|
static void |
addInstrumentationAttributeInfo(ClassFile cf,
java.util.List<IInstrumentationStrategy> itors)
Add the Instrumentation attribute with the given list of instrumentors to the class file. |
|
static void |
addInstrumentationAttributeInfo(ClassFile cf,
java.lang.String s)
Add the Instrumentation attribute with the given instrumentor class name string to the class file. |
|
void |
adjustPC(int startPC,
int deltaPC)
Adjust program counter values contained in this attribute, starting at startPC, by adding deltaPC to them. |
|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
|
|
execute(IAttributeVisitor<R,D> visitor,
D param)
Execute a visitor on this attribute. |
|
static java.lang.String |
getAttributeName()
Returns the name of the attribute as it appears in the class file. |
|
java.lang.String[] |
getInstrumentatorClassNames()
Return an array of instrumentator class names. |
|
java.lang.String |
getInstrumentatorClassNameString()
Return the instrumentator class names as string. |
|
void |
setInstrumentatorClassNames(java.lang.String[] classNames)
Set the source file name information. |
|
java.lang.String |
toString()
Return a human-readable version of this attribute. |
|
void |
translatePC(int index,
int deltaIndex,
LineNumberTable oldLnt,
LineNumberTable newLnt)
Translate the program counter values contained in this attribute from an old line number table to a new one. |
Methods inherited from class edu.rice.cs.cunit.classFile.attributes.AAttributeInfo |
---|
equals, getData, getName, hashCode, read, setData, setName, write |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME
Constructor Detail |
---|
public InstrumentationAttributeInfo(AUTFPoolInfo name, byte[] data, ConstantPool cp) throws java.lang.ClassFormatError
name
- attribute namedata
- attribute datacp
- constant pool
java.lang.ClassFormatError
Method Detail |
---|
public java.lang.String[] getInstrumentatorClassNames() throws java.lang.ClassFormatError
java.lang.ClassFormatError
public java.lang.String getInstrumentatorClassNameString() throws java.lang.ClassFormatError
java.lang.ClassFormatError
public void setInstrumentatorClassNames(java.lang.String[] classNames)
classNames
- constant poolpublic <R,D> R execute(IAttributeVisitor<R,D> visitor, D param)
execute
in class AAttributeInfo
visitor
- visitorparam
- visitor-specific parameter
public void adjustPC(int startPC, int deltaPC)
adjustPC
in class AAttributeInfo
startPC
- program counter to start atdeltaPC
- change in program counter valuespublic void translatePC(int index, int deltaIndex, LineNumberTable oldLnt, LineNumberTable newLnt)
translatePC
in class AAttributeInfo
index
- critical point (insertion or deletion point)deltaIndex
- delta value to add to all old line numbers greater than the critical pointoldLnt
- old line number tablenewLnt
- new line number tablepublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AAttributeInfo
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class AAttributeInfo
public static void addInstrumentationAttributeInfo(ClassFile cf, java.lang.String s)
cf
- class files
- names of instrumentor classes, separated by ';'public static void addInstrumentationAttributeInfo(ClassFile cf, java.util.List<IInstrumentationStrategy> itors)
cf
- class fileitors
- list of instrumentorspublic static void addInstrumentationAttributeInfo(ClassFile cf, java.util.Collection<java.lang.String> itors)
cf
- class fileitors
- collection of instrumentor class namespublic static java.lang.String getAttributeName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |