FileDocCategorySizeDatePackage
AnnotatedClassAttribute.javaAPI DocGlassfish v2 API4974Fri May 04 22:34:28 BST 2007com.sun.jdo.api.persistence.enhancer.classfile

AnnotatedClassAttribute

public class AnnotatedClassAttribute extends ClassAttribute
AnnotatedClassAttribute represents a class level attribute class file which identifies the level of annotation of the class.

Fields Summary
public static final String
expectedAttrName
public static final short
expectedAttrVersion
public static final short
generatedFlag
public static final short
annotatedFlag
public static final short
modifiedFlag
private short
attrVersion
private short
annotationFlags
private long
classModTime
private long
classAnnotationTime
Constructors Summary
public AnnotatedClassAttribute(ConstUtf8 nameAttr, short version, short annFlags, long modTime, long annTime)
Constructor

    super(nameAttr);
    attrVersion = version;
    annotationFlags = annFlags;
    classModTime = modTime;
    classAnnotationTime = annTime;
  
Methods Summary
public longgetAnnotationTime()

    return classAnnotationTime;
  
public shortgetFlags()

    return annotationFlags;
  
public longgetModTime()

    return classModTime;
  
public shortgetVersion()


  /* public accessors */

     
    return attrVersion;
  
voidprint(java.io.PrintStream out, int indent)

    ClassPrint.spaces(out, indent);
    out.println("version: " + attrVersion);//NOI18N
    out.println(" flags: " + annotationFlags);//NOI18N
    out.println(" modTime: " + classModTime);//NOI18N
    out.println(" annTime: " + classAnnotationTime);//NOI18N
  
static com.sun.jdo.api.persistence.enhancer.classfile.AnnotatedClassAttributeread(ConstUtf8 attrName, java.io.DataInputStream data, ConstantPool pool)

    short version = data.readShort();
    short annFlags = data.readShort();
    long modTime = data.readLong();
    long annTime = data.readLong();
    return  new AnnotatedClassAttribute(attrName, version, annFlags,
					modTime, annTime);
  
public voidsetAnnotationTime(long time)

    classAnnotationTime = time;
  
public voidsetFlags(short flags)

    annotationFlags = flags;
  
public voidsetModTime(long time)

    classModTime = time;
  
public voidsetVersion(short version)

    attrVersion = version;
  
voidwrite(java.io.DataOutputStream out)

    out.writeShort(attrName().getIndex());
    out.writeShort(20);
    out.writeShort(attrVersion);
    out.writeShort(annotationFlags);
    out.writeLong(classModTime);
    out.writeLong(classAnnotationTime);