Methods Summary |
---|
public InsnTarget[] | getAnnotationRanges()
return annotationRanges;
|
public short | getFlags()
return annotationFlags;
|
public short | getVersion()
/* public accessors */
return attrVersion;
|
void | print(java.io.PrintStream out, int indent)
ClassPrint.spaces(out, indent);
out.println("version: " + attrVersion);//NOI18N
out.println(" flags: " + annotationFlags);//NOI18N
if (annotationRanges != null) {
out.println("Annotations: ");//NOI18N
for (int i=0; i<annotationRanges.length/2; i++) {
ClassPrint.spaces(out, indent+2);
out.println(annotationRanges[i*2] + " to " +//NOI18N
annotationRanges[i*2+1]);
}
}
|
static com.sun.jdo.api.persistence.enhancer.classfile.AnnotatedMethodAttribute | read(ConstUtf8 attrName, java.io.DataInputStream data, CodeEnv env)
short version = data.readShort();
short annFlags = data.readShort();
short nRanges = data.readShort();
InsnTarget ranges[] = new InsnTarget[nRanges*2];
for (int i=0; i<nRanges; i++) {
ranges[i*2] = env.getTarget(data.readShort());
ranges[i*2+1] = env.getTarget(data.readShort());
}
return new AnnotatedMethodAttribute(attrName, version, annFlags, ranges);
|
public void | setAnnotationRanges(InsnTarget[] ranges)
annotationRanges = ranges;
|
public void | setFlags(short flags)
annotationFlags = flags;
|
public void | setVersion(short version)
attrVersion = version;
|
void | write(java.io.DataOutputStream out)
out.writeShort(attrName().getIndex());
if (annotationRanges == null)
out.writeShort(2);
else
out.writeShort(4 + 2 * annotationRanges.length);
out.writeShort(attrVersion);
out.writeShort(annotationFlags);
if (annotationRanges == null)
out.writeShort(0);
else {
out.writeShort(annotationRanges.length / 2);
for (int i=0; i<annotationRanges.length; i++)
out.writeShort(annotationRanges[i].offset());
}
|