git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@218 30ef5769-5b8d-40dd-aea6-55b5d6557bb3tags/rel_3_17_1_ga
@@ -301,6 +301,10 @@ public abstract class CtBehavior extends CtMember { | |||
* If that attribute is not found in the class file, this | |||
* method returns null. | |||
* | |||
* <p>Note that an attribute is a data block specified by | |||
* the class file format. | |||
* See {@link javassist.bytecode.AttributeInfo}. | |||
* | |||
* @param name attribute name | |||
*/ | |||
public byte[] getAttribute(String name) { | |||
@@ -314,6 +318,10 @@ public abstract class CtBehavior extends CtMember { | |||
/** | |||
* Adds an attribute. The attribute is saved in the class file. | |||
* | |||
* <p>Note that an attribute is a data block specified by | |||
* the class file format. | |||
* See {@link javassist.bytecode.AttributeInfo}. | |||
* | |||
* @param name attribute name | |||
* @param data attribute value | |||
*/ |
@@ -250,6 +250,15 @@ public class CtField extends CtMember { | |||
ainfo, ainfo2); | |||
} | |||
/** | |||
* Returns the character string representing the type of the field. | |||
* If two fields have the same type, | |||
* <code>getSignature()</code> returns the same string. | |||
*/ | |||
public String getSignature() { | |||
return fieldInfo.getDescriptor(); | |||
} | |||
/** | |||
* Returns the type of the field. | |||
*/ | |||
@@ -316,6 +325,10 @@ public class CtField extends CtMember { | |||
* If that attribute is not found in the class file, this | |||
* method returns null. | |||
* | |||
* <p>Note that an attribute is a data block specified by | |||
* the class file format. | |||
* See {@link javassist.bytecode.AttributeInfo}. | |||
* | |||
* @param name attribute name | |||
*/ | |||
public byte[] getAttribute(String name) { | |||
@@ -329,6 +342,10 @@ public class CtField extends CtMember { | |||
/** | |||
* Adds an attribute. The attribute is saved in the class file. | |||
* | |||
* <p>Note that an attribute is a data block specified by | |||
* the class file format. | |||
* See {@link javassist.bytecode.AttributeInfo}. | |||
* | |||
* @param name attribute name | |||
* @param data attribute value | |||
*/ |
@@ -141,11 +141,22 @@ public abstract class CtMember { | |||
*/ | |||
public abstract String getName(); | |||
/** | |||
* Returns the character string representing the signature of the member. | |||
* If two members have the same signature (parameter types etc.), | |||
* <code>getSignature()</code> returns the same string. | |||
*/ | |||
public abstract String getSignature(); | |||
/** | |||
* Obtains a user-defined attribute with the given name. | |||
* If that attribute is not found in the class file, this | |||
* method returns null. | |||
* | |||
* <p>Note that an attribute is a data block specified by | |||
* the class file format. | |||
* See {@link javassist.bytecode.AttributeInfo}. | |||
* | |||
* @param name attribute name | |||
*/ | |||
public abstract byte[] getAttribute(String name); | |||
@@ -153,6 +164,10 @@ public abstract class CtMember { | |||
/** | |||
* Adds a user-defined attribute. The attribute is saved in the class file. | |||
* | |||
* <p>Note that an attribute is a data block specified by | |||
* the class file format. | |||
* See {@link javassist.bytecode.AttributeInfo}. | |||
* | |||
* @param name attribute name | |||
* @param data attribute value | |||
*/ |