|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.javac.code.Symtab
public class Symtab
A class that defines all predefined constants and operators as well as special classes such as java.lang.Object, which need to be known to the compiler. All symbols are held in instance fields. This makes it possible to work in multiple concurrent projects, which might use different class files for library classes.
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.
Constructor Summary | |
---|---|
protected |
Symtab(Context context)
Constructor; enters all predefined identifiers and operators into symbol table. |
Method Summary | |
---|---|
private void |
enterBinop(java.lang.String name,
Type left,
Type right,
Type res,
int opcode)
Enter a binary operation into symbol table. |
private void |
enterBinop(java.lang.String name,
Type left,
Type right,
Type res,
int opcode1,
int opcode2)
Enter a binary operation, as above but with two opcodes, which get encoded as (opcode1 << ByteCodeTags.preShift) + opcode2. |
private Type |
enterClass(java.lang.String s)
Enter a class into symbol table. |
private Symbol.VarSymbol |
enterConstant(java.lang.String name,
Type type)
Enter a constant into symbol table. |
private Symbol.OperatorSymbol |
enterUnop(java.lang.String name,
Type arg,
Type res,
int opcode)
Enter a unary operation into symbol table. |
void |
initType(Type type,
java.lang.String name)
|
void |
initType(Type type,
java.lang.String name,
java.lang.String bname)
|
void |
initType(Type type,
Symbol.ClassSymbol c)
|
static Symtab |
instance(Context context)
Get the symbol table instance. |
void |
synthesizeBoxTypeIfMissing(Type type)
|
void |
synthesizeEmptyInterfaceIfMissing(Type type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Context.Key<Symtab> symtabKey
public final Type byteType
public final Type charType
public final Type shortType
public final Type intType
public final Type longType
public final Type floatType
public final Type doubleType
public final Type booleanType
public final Type botType
public final Type.JCNoType voidType
private final Names names
private final ClassReader reader
private final Target target
public final Symbol.PackageSymbol rootPackage
public final Symbol.PackageSymbol unnamedPackage
public final Symbol.TypeSymbol noSymbol
public final Symbol.ClassSymbol errSymbol
public final Type errType
public final Type unknownType
public final Symbol.ClassSymbol arrayClass
public final Symbol.MethodSymbol arrayCloneMethod
public final Symbol.ClassSymbol boundClass
public final Symbol.ClassSymbol methodClass
public final Type objectType
public final Type classType
public final Type classLoaderType
public final Type stringType
public final Type stringBufferType
public final Type stringBuilderType
public final Type cloneableType
public final Type serializableType
public final Type throwableType
public final Type errorType
public final Type illegalArgumentExceptionType
public final Type exceptionType
public final Type runtimeExceptionType
public final Type classNotFoundExceptionType
public final Type noClassDefFoundErrorType
public final Type noSuchFieldErrorType
public final Type assertionErrorType
public final Type cloneNotSupportedExceptionType
public final Type annotationType
public final Symbol.TypeSymbol enumSym
public final Type listType
public final Type collectionsType
public final Type comparableType
public final Type arraysType
public final Type iterableType
public final Type iteratorType
public final Type annotationTargetType
public final Type overrideType
public final Type retentionType
public final Type deprecatedType
public final Type suppressWarningsType
public final Type inheritedType
public final Type proprietaryType
public final Type systemType
public final Type stringCodeType
public final Type mspTreeCodeType
public final Type safeMspTreeCodeType
public final Type mspTreeType
public final Type stringMspTreeType
public final Type internalMspTreeType
public final Type cspMspTreeType
public final Type codeType
public final Type safeCodeType
public final Type javaLangVoidType
public final Symbol.VarSymbol lengthVar
public final Symbol.OperatorSymbol nullcheck
public final Symbol.MethodSymbol enumFinalFinalize
public final Type[] typeOfTag
public final Name[] boxedName
public final java.util.Map<Name,Symbol.ClassSymbol> classes
public final java.util.Map<Name,Symbol.PackageSymbol> packages
public final Symbol.ClassSymbol predefClass
Constructor Detail |
---|
protected Symtab(Context context) throws Symbol.CompletionFailure
Symbol.CompletionFailure
Method Detail |
---|
public static Symtab instance(Context context)
public void initType(Type type, Symbol.ClassSymbol c)
public void initType(Type type, java.lang.String name)
public void initType(Type type, java.lang.String name, java.lang.String bname)
private Symbol.VarSymbol enterConstant(java.lang.String name, Type type)
name
- The constant's name.type
- The constant's type.private void enterBinop(java.lang.String name, Type left, Type right, Type res, int opcode)
name
- The name of the operator.left
- The type of the left operand.right
- The type of the left operand.res
- The operation's result type.opcode
- The operation's bytecode instruction.private void enterBinop(java.lang.String name, Type left, Type right, Type res, int opcode1, int opcode2)
opcode1
- First opcode.opcode2
- Second opcode.private Symbol.OperatorSymbol enterUnop(java.lang.String name, Type arg, Type res, int opcode)
name
- The name of the operator.arg
- The type of the operand.res
- The operation's result type.opcode
- The operation's bytecode instruction.private Type enterClass(java.lang.String s)
The
- name of the class.public void synthesizeEmptyInterfaceIfMissing(Type type)
public void synthesizeBoxTypeIfMissing(Type type)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |