proguard.classfile.attribute
Class Attribute

java.lang.Object
  extended by proguard.classfile.attribute.Attribute
All Implemented Interfaces:
VisitorAccepter
Direct Known Subclasses:
AnnotationDefaultAttribute, AnnotationsAttribute, CodeAttribute, ConstantValueAttribute, DeprecatedAttribute, EnclosingMethodAttribute, ExceptionsAttribute, InnerClassesAttribute, LineNumberTableAttribute, LocalVariableTableAttribute, LocalVariableTypeTableAttribute, ParameterAnnotationsAttribute, SignatureAttribute, SourceDirAttribute, SourceFileAttribute, StackMapAttribute, StackMapTableAttribute, SyntheticAttribute, UnknownAttribute

public abstract class Attribute
extends java.lang.Object
implements VisitorAccepter

This abstract class represents an attribute that is attached to a class, a class member, or a code attribute. Specific types of attributes are subclassed from it.


Field Summary
 int u2attributeNameIndex
           
 java.lang.Object visitorInfo
          An extra field in which visitors can store information.
 
Constructor Summary
protected Attribute()
          Create an uninitialized Attribute.
protected Attribute(int u2attributeNameIndex)
          Create an initialized Attribute.
 
Method Summary
 void accept(Clazz clazz, AttributeVisitor attributeVisitor)
          Accepts the given visitor.
 void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
          Accepts the given visitor in the context of the given field.
 void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
          Accepts the given visitor in the context of the given method.
 void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
          Accepts the given visitor in the context of the given code attribute.
 java.lang.String getAttributeName(Clazz clazz)
          Returns the String name of the attribute.
 java.lang.Object getVisitorInfo()
          Gets the visitor information of the visitor accepter.
 void setVisitorInfo(java.lang.Object visitorInfo)
          Sets the visitor information of the visitor accepter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

u2attributeNameIndex

public int u2attributeNameIndex

visitorInfo

public java.lang.Object visitorInfo
An extra field in which visitors can store information.

Constructor Detail

Attribute

protected Attribute()
Create an uninitialized Attribute.


Attribute

protected Attribute(int u2attributeNameIndex)
Create an initialized Attribute.

Method Detail

getAttributeName

public java.lang.String getAttributeName(Clazz clazz)
Returns the String name of the attribute.


accept

public void accept(Clazz clazz,
                   AttributeVisitor attributeVisitor)
Accepts the given visitor.


accept

public void accept(Clazz clazz,
                   Field field,
                   AttributeVisitor attributeVisitor)
Accepts the given visitor in the context of the given field.


accept

public void accept(Clazz clazz,
                   Method method,
                   AttributeVisitor attributeVisitor)
Accepts the given visitor in the context of the given method.


accept

public void accept(Clazz clazz,
                   Method method,
                   CodeAttribute codeAttribute,
                   AttributeVisitor attributeVisitor)
Accepts the given visitor in the context of the given code attribute.


getVisitorInfo

public java.lang.Object getVisitorInfo()
Description copied from interface: VisitorAccepter
Gets the visitor information of the visitor accepter.

Specified by:
getVisitorInfo in interface VisitorAccepter

setVisitorInfo

public void setVisitorInfo(java.lang.Object visitorInfo)
Description copied from interface: VisitorAccepter
Sets the visitor information of the visitor accepter.

Specified by:
setVisitorInfo in interface VisitorAccepter