< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java

Print this page




  30 
  31 /** A JVM class file.
  32  *
  33  *  <p>Generic Java classfiles have one additional attribute for classes,
  34  *  methods and fields:
  35  *  <pre>
  36  *   "Signature" (u4 attr-length, u2 signature-index)
  37  *  </pre>
  38  *
  39  *  <p>A signature gives the full Java type of a method or field. When
  40  *  used as a class attribute, it indicates type parameters, followed
  41  *  by supertype, followed by all interfaces.
  42  *  <pre>
  43  *     methodOrFieldSignature ::= type
  44  *     classSignature         ::= [ typeparams ] supertype { interfacetype }
  45  *  </pre>
  46  *  <p>The type syntax in signatures is extended as follows:
  47  *  <pre>{@literal
  48  *     type       ::= ... | classtype | methodtype | typevar
  49  *     classtype  ::= classsig { '.' classsig }
  50  *     classig    ::= 'L' name [typeargs] ';'
  51  *     methodtype ::= [ typeparams ] '(' { type } ')' type
  52  *     typevar    ::= 'T' name ';'
  53  *     typeargs   ::= '<' type { type } '>'
  54  *     typeparams ::= '<' typeparam { typeparam } '>'
  55  *     typeparam  ::= name ':' type
  56  *  }</pre>
  57  *  <p>This class defines constants used in class files as well
  58  *  as routines to convert between internal ``.'' and external ``/''
  59  *  separators in class names.
  60  *
  61  *  <p><b>This is NOT part of any supported API.
  62  *  If you write code that depends on this, you do so at your own risk.
  63  *  This code and its internal interfaces are subject to change or
  64  *  deletion without notice.</b> */
  65 public class ClassFile {
  66 
  67     public final static int JAVA_MAGIC = 0xCAFEBABE;
  68 
  69     // see Target
  70     public final static int CONSTANT_Utf8 = 1;




  30 
  31 /** A JVM class file.
  32  *
  33  *  <p>Generic Java classfiles have one additional attribute for classes,
  34  *  methods and fields:
  35  *  <pre>
  36  *   "Signature" (u4 attr-length, u2 signature-index)
  37  *  </pre>
  38  *
  39  *  <p>A signature gives the full Java type of a method or field. When
  40  *  used as a class attribute, it indicates type parameters, followed
  41  *  by supertype, followed by all interfaces.
  42  *  <pre>
  43  *     methodOrFieldSignature ::= type
  44  *     classSignature         ::= [ typeparams ] supertype { interfacetype }
  45  *  </pre>
  46  *  <p>The type syntax in signatures is extended as follows:
  47  *  <pre>{@literal
  48  *     type       ::= ... | classtype | methodtype | typevar
  49  *     classtype  ::= classsig { '.' classsig }
  50  *     classig    ::= 'L' name [typeargs] ';' | 'Q' name [typeargs] ';'
  51  *     methodtype ::= [ typeparams ] '(' { type } ')' type
  52  *     typevar    ::= 'T' name ';'
  53  *     typeargs   ::= '<' type { type } '>'
  54  *     typeparams ::= '<' typeparam { typeparam } '>'
  55  *     typeparam  ::= name ':' type
  56  *  }</pre>
  57  *  <p>This class defines constants used in class files as well
  58  *  as routines to convert between internal ``.'' and external ``/''
  59  *  separators in class names.
  60  *
  61  *  <p><b>This is NOT part of any supported API.
  62  *  If you write code that depends on this, you do so at your own risk.
  63  *  This code and its internal interfaces are subject to change or
  64  *  deletion without notice.</b> */
  65 public class ClassFile {
  66 
  67     public final static int JAVA_MAGIC = 0xCAFEBABE;
  68 
  69     // see Target
  70     public final static int CONSTANT_Utf8 = 1;


< prev index next >