home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1999 March / maximum-cd-1999-03.iso / Feature / Lotus / ORGANIZE / COMPNENT / LTOUIN21.ZIP / sunw / demo / classfile / Attribute.class (.txt) next >
Encoding:
Java Class File  |  1998-03-12  |  1.3 KB  |  42 lines

  1. package sunw.demo.classfile;
  2.  
  3. import java.io.DataOutputStream;
  4. import java.io.IOException;
  5.  
  6. abstract class Attribute {
  7.    static final String SOURCEFILE = "SourceFile";
  8.    static final String CONSTANTVALUE = "ConstantValue";
  9.    static final String LOCALVARIABLETABLE = "LocalVariableTable";
  10.    static final String EXCEPTIONS = "Exceptions";
  11.    static final String LINENUMBERTABLE = "LineNumberTable";
  12.    static final String CODE = "Code";
  13.    private UTF8Constant name;
  14.    private ClassFile classFile;
  15.  
  16.    protected Attribute(String var1, ClassFile var2) {
  17.       UTF8Constant var3 = new UTF8Constant(var1, var2);
  18.       this.name = var3;
  19.       this.classFile = var2;
  20.    }
  21.  
  22.    public abstract boolean equals(Object var1);
  23.  
  24.    ClassFile getClassFile() {
  25.       return this.classFile;
  26.    }
  27.  
  28.    abstract int getLength();
  29.  
  30.    String getName() {
  31.       return this.name.getString();
  32.    }
  33.  
  34.    short getNameConstantPoolIndex() {
  35.       return this.name.getConstantPoolIndex();
  36.    }
  37.  
  38.    public abstract int hashCode();
  39.  
  40.    abstract void write(DataOutputStream var1) throws IOException;
  41. }
  42.