|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.jvm.ClassFile
public class ClassFile
A JVM class file.
Generic Java classfiles have one additional attribute for classes, methods and fields:
"Signature" (u4 attr-length, u2 signature-index)
A signature gives the full Java type of a method or field. When used as a class attribute, it indicates type parameters, followed by supertype, followed by all interfaces.
methodOrFieldSignature ::= type
classSignature ::= [ typeparams ] supertype { interfacetype }
The type syntax in signatures is extended as follows:
type ::= ... | classtype | methodtype | typevar
classtype ::= classsig { '.' classsig }
classig ::= 'L' name [typeargs] ';'
methodtype ::= [ typeparams ] '(' { type } ')' type
typevar ::= 'T' name ';'
typeargs ::= '<' type { type } '>'
typeparams ::= '<' typeparam { typeparam } '>'
typeparam ::= name ':' type
This class defines constants used in class files as well as routines to convert between internal ``.'' and external ``/'' separators in class names.
This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Nested Class Summary | |
|---|---|
static class |
ClassFile.NameAndType
A class for the name-and-type signature of a method or field. |
| Field Summary | |
|---|---|
static int |
CONSTANT_Class
|
static int |
CONSTANT_Double
|
static int |
CONSTANT_Fieldref
|
static int |
CONSTANT_Float
|
static int |
CONSTANT_Integer
|
static int |
CONSTANT_InterfaceMethodref
|
static int |
CONSTANT_Long
|
static int |
CONSTANT_Methodref
|
static int |
CONSTANT_NameandType
|
static int |
CONSTANT_String
|
static int |
CONSTANT_Unicode
|
static int |
CONSTANT_Utf8
|
static int |
JAVA_MAGIC
|
static int |
MAX_CODE
|
static int |
MAX_DIMENSIONS
|
static int |
MAX_LOCALS
|
static int |
MAX_PARAMETERS
|
static int |
MAX_STACK
|
| Constructor Summary | |
|---|---|
ClassFile()
|
|
| Method Summary | |
|---|---|
static byte[] |
externalize(byte[] buf,
int offset,
int len)
Return external representation of buf[offset..offset+len-1], converting '.' to '/'. |
static byte[] |
externalize(Name name)
Return external representation of given name, converting '/' to '.'. |
static byte[] |
internalize(byte[] buf,
int offset,
int len)
Return internal representation of buf[offset..offset+len-1], converting '/' to '.'. |
static byte[] |
internalize(Name name)
Return internal representation of given name, converting '/' to '.'. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int JAVA_MAGIC
public static final int CONSTANT_Utf8
public static final int CONSTANT_Unicode
public static final int CONSTANT_Integer
public static final int CONSTANT_Float
public static final int CONSTANT_Long
public static final int CONSTANT_Double
public static final int CONSTANT_Class
public static final int CONSTANT_String
public static final int CONSTANT_Fieldref
public static final int CONSTANT_Methodref
public static final int CONSTANT_InterfaceMethodref
public static final int CONSTANT_NameandType
public static final int MAX_PARAMETERS
public static final int MAX_DIMENSIONS
public static final int MAX_CODE
public static final int MAX_LOCALS
public static final int MAX_STACK
| Constructor Detail |
|---|
public ClassFile()
| Method Detail |
|---|
public static byte[] internalize(byte[] buf,
int offset,
int len)
public static byte[] internalize(Name name)
public static byte[] externalize(byte[] buf,
int offset,
int len)
public static byte[] externalize(Name name)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||