org.aspectj.weaver
Class AjAttribute

java.lang.Object
  extended by org.aspectj.weaver.AjAttribute
Direct Known Subclasses:
AjAttribute.AdviceAttribute, AjAttribute.AjSynthetic, AjAttribute.Aspect, AjAttribute.DeclareAttribute, AjAttribute.EffectiveSignatureAttribute, AjAttribute.MethodDeclarationLineNumberAttribute, AjAttribute.PointcutDeclarationAttribute, AjAttribute.PrivilegedAttribute, AjAttribute.SourceContextAttribute, AjAttribute.TypeMunger, AjAttribute.WeaverState, AjAttribute.WeaverVersionInfo

public abstract class AjAttribute
extends java.lang.Object

These attributes are written to and read from .class files (see the JVM spec).

Each member or type can have a number of AjAttributes. Each such attribute is in 1-1 correspondence with an Unknown bcel attribute. Creating one of these does NOTHING to the underlying thing, so if you really want to add an attribute to a particular thing, well, you'd better actually do that.


Nested Class Summary
static class AjAttribute.AdviceAttribute
           
static class AjAttribute.AjSynthetic
          Synthetic members should have NO advice put on them or on their contents.
static class AjAttribute.Aspect
           
static class AjAttribute.DeclareAttribute
           
static class AjAttribute.EffectiveSignatureAttribute
           
static class AjAttribute.MethodDeclarationLineNumberAttribute
           
static class AjAttribute.PointcutDeclarationAttribute
           
static class AjAttribute.PrivilegedAttribute
           
static class AjAttribute.SourceContextAttribute
           
static class AjAttribute.TypeMunger
           
static class AjAttribute.WeaverState
           
static class AjAttribute.WeaverVersionInfo
           
 
Field Summary
static java.lang.String AttributePrefix
           
 
Constructor Summary
AjAttribute()
           
 
Method Summary
 byte[] getAllBytes(short nameIndex, ConstantPoolWriter dataCompressor)
          Writes the full attribute, i.e.
 byte[] getBytes(ConstantPoolWriter compressor)
          Just writes the contents
 char[] getNameChars()
           
abstract  java.lang.String getNameString()
           
static AjAttribute read(AjAttribute.WeaverVersionInfo v, java.lang.String name, byte[] bytes, ISourceContext context, World w, ConstantPoolReader dataDecompressor)
           
protected abstract  void write(CompressingDataOutputStream s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AttributePrefix

public static final java.lang.String AttributePrefix
See Also:
Constant Field Values
Constructor Detail

AjAttribute

public AjAttribute()
Method Detail

write

protected abstract void write(CompressingDataOutputStream s)
                       throws java.io.IOException
Throws:
java.io.IOException

getNameString

public abstract java.lang.String getNameString()

getNameChars

public char[] getNameChars()

getBytes

public byte[] getBytes(ConstantPoolWriter compressor)
Just writes the contents


getAllBytes

public byte[] getAllBytes(short nameIndex,
                          ConstantPoolWriter dataCompressor)
Writes the full attribute, i.e. name_index, length, and contents

Parameters:
constantPool -

read

public static AjAttribute read(AjAttribute.WeaverVersionInfo v,
                               java.lang.String name,
                               byte[] bytes,
                               ISourceContext context,
                               World w,
                               ConstantPoolReader dataDecompressor)