Package | Description |
---|---|
org.codehaus.janino |
The classes in this package pose the core of the Janino JavaTM compiler.
|
org.codehaus.janino.tools |
Auxiliary command line tools related to JANINO.
|
Modifier and Type | Class and Description |
---|---|
class |
ClassFileIClass
|
private static class |
IClass.PrimitiveIClass |
(package private) class |
ReflectionIClass
Wraps a
Class in an IClass . |
Modifier and Type | Field and Description |
---|---|
IClass |
IClassLoader.ANNO_java_lang_Override
Representation of the
Override annotation. |
IClass |
Java.NewInitializedArray.arrayIClass
The resolved
Java.NewInitializedArray.arrayType . |
private IClass |
IClass.arrayIClass |
static IClass |
IClass.BOOLEAN
The
IClass object for the primitive type BOOLEAN. |
static IClass |
IClass.BYTE
The
IClass object for the primitive type BYTE. |
static IClass |
IClass.CHAR
The
IClass object for the primitive type CHAR. |
private IClass |
IClass.componentTypeCache |
private IClass[] |
IClass.declaredIClassesCache |
private IClass |
IClass.declaringIClassCache |
static IClass |
IClass.DOUBLE
The
IClass object for the primitive type DOUBLE. |
static IClass |
IClass.FLOAT
The
IClass object for the primitive type FLOAT. |
IClass |
Java.SimpleType.iClass
|
(package private) IClass |
Java.ThisReference.iClass
A cache for the type of the instance that 'this' refers to.
|
protected IClass |
Java.NewClassInstance.iClass
The resolved
Java.NewClassInstance.type . |
static IClass |
IClass.INT
The
IClass object for the primitive type INT. |
(package private) IClass[] |
Java.InterfaceDeclaration.interfaces
Set during "compile()".
|
private IClass[] |
IClass.interfacesCache |
static IClass |
IClass.LONG
The
IClass object for the primitive type LONG. |
private IClass |
IClass.outerIClassCache |
private IClass[] |
IClass.IInvocable.parameterTypesCache |
(package private) IClass |
Java.AbstractTypeDeclaration.resolvedType
Holds the resolved type during compilation.
|
(package private) IClass |
Java.FunctionDeclarator.returnType
Set by "compile()".
|
static IClass |
IClass.SHORT
The
IClass object for the primitive type SHORT. |
private IClass |
IClass.superclassCache |
(package private) IClass |
Java.QualifiedThisReference.targetIClass
The resolved
Java.QualifiedThisReference.qualification . |
private IClass[] |
IClass.IInvocable.thrownExceptionsCache |
private IClass |
UnitCompiler.SimpleIField.type |
private IClass |
Java.LocalVariableSlot.type |
IClass |
Java.LocalVariable.type
The type of this local variable.
|
IClass |
IClassLoader.TYPE_java_io_Serializable
Representation of the
Serializable type. |
IClass |
IClassLoader.TYPE_java_lang_AssertionError
Representation of the
AssertionError type. |
IClass |
IClassLoader.TYPE_java_lang_Boolean
Representation of the
Boolean type. |
IClass |
IClassLoader.TYPE_java_lang_Byte
Representation of the
Byte type. |
IClass |
IClassLoader.TYPE_java_lang_Character
Representation of the
Character type. |
IClass |
IClassLoader.TYPE_java_lang_Class
Representation of the
Class type. |
IClass |
IClassLoader.TYPE_java_lang_Cloneable
Representation of the
Cloneable type. |
IClass |
IClassLoader.TYPE_java_lang_Double
Representation of the
Double type. |
IClass |
IClassLoader.TYPE_java_lang_Error
Representation of the
Error type. |
IClass |
IClassLoader.TYPE_java_lang_Exception
Representation of the
Exception type. |
IClass |
IClassLoader.TYPE_java_lang_Float
Representation of the
Float type. |
IClass |
IClassLoader.TYPE_java_lang_Integer
Representation of the
Integer type. |
IClass |
IClassLoader.TYPE_java_lang_Iterable
Representation of the
Iterable type. |
IClass |
IClassLoader.TYPE_java_lang_Long
Representation of the
Long type. |
IClass |
IClassLoader.TYPE_java_lang_Object
Representation of the
Object type. |
IClass |
IClassLoader.TYPE_java_lang_RuntimeException
Representation of the
RuntimeException type. |
IClass |
IClassLoader.TYPE_java_lang_Short
Representation of the
Short type. |
IClass |
IClassLoader.TYPE_java_lang_String
Representation of the
String type. |
IClass |
IClassLoader.TYPE_java_lang_StringBuilder
Representation of the
StringBuilder type. |
IClass |
IClassLoader.TYPE_java_lang_Throwable
Representation of the
Throwable type. |
IClass |
IClassLoader.TYPE_java_util_Iterator
Representation of the
Iterator type. |
static IClass |
IClass.VOID
The
IClass object for the type VOID. |
private static IClass[] |
IClass.ZERO_ICLASSES |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,IClass> |
IClassLoader.loadedIClasses |
private java.util.Map<java.lang.String,IClass> |
UnitCompiler.onDemandImportableTypes
To be used only by
UnitCompiler.importTypeOnDemand(String, Location) ; cache for on-demand-imported types. |
private java.util.Map<java.lang.String,IClass> |
ClassFileIClass.resolvedClasses |
private java.util.Collection<IClass> |
UnitCompiler.staticImportsOnDemand |
Modifier and Type | Method and Description |
---|---|
private IClass |
UnitCompiler.binaryNumericPromotion(Java.Locatable locatable,
IClass type1,
CodeContext.Inserter convertInserter1,
IClass type2)
Implements "binary numeric promotion" (5.6.2)
|
private IClass |
UnitCompiler.binaryNumericPromotion(Java.Locatable locatable,
IClass type1,
CodeContext.Inserter convertInserter1,
IClass type2,
CodeContext.Inserter convertInserter2)
Implements "binary numeric promotion" (5.6.2), which may perform unboxing conversion.
|
private IClass |
UnitCompiler.binaryNumericPromotionType(Java.Locatable locatable,
IClass type1,
IClass type2) |
private IClass[] |
ReflectionIClass.classesToIClasses(java.lang.Class[] cs) |
private IClass |
ReflectionIClass.classToIClass(java.lang.Class c)
|
private IClass |
UnitCompiler.compileArithmeticBinaryOperation(Java.Locatable locatable,
IClass lhsType,
java.lang.String operator,
Java.Rvalue rhs)
The LHS operand of type
lhsType is expected on the stack. |
private IClass |
UnitCompiler.compileArithmeticOperation(Java.Locatable locatable,
IClass type,
java.util.Iterator<Java.Rvalue> operands,
java.lang.String operator)
Execute an arithmetic operation on a sequence of
operands . |
private IClass |
UnitCompiler.compileGet(Java.Rvalue rv)
Generates code that determines the value of the
Java.Rvalue and puts it on the operand stack. |
private IClass |
UnitCompiler.compileGet2(Java.AmbiguousName an) |
private IClass |
UnitCompiler.compileGet2(Java.ArrayAccessExpression aae) |
private IClass |
UnitCompiler.compileGet2(Java.ArrayLength al) |
private IClass |
UnitCompiler.compileGet2(Java.Assignment a) |
private IClass |
UnitCompiler.compileGet2(Java.BinaryOperation bo) |
private IClass |
UnitCompiler.compileGet2(Java.BooleanRvalue brv) |
private IClass |
UnitCompiler.compileGet2(Java.Cast c) |
private IClass |
UnitCompiler.compileGet2(Java.ClassLiteral cl) |
private IClass |
UnitCompiler.compileGet2(Java.ConditionalExpression ce) |
private IClass |
UnitCompiler.compileGet2(Java.Crement c) |
private IClass |
UnitCompiler.compileGet2(Java.FieldAccess fa) |
private IClass |
UnitCompiler.compileGet2(Java.FieldAccessExpression fae) |
private IClass |
UnitCompiler.compileGet2(Java.Instanceof io) |
private IClass |
UnitCompiler.compileGet2(Java.Literal l) |
private IClass |
UnitCompiler.compileGet2(Java.LocalVariableAccess lva) |
private IClass |
UnitCompiler.compileGet2(Java.MethodInvocation mi) |
private IClass |
UnitCompiler.compileGet2(Java.NewAnonymousClassInstance naci) |
private IClass |
UnitCompiler.compileGet2(Java.NewArray na) |
private IClass |
UnitCompiler.compileGet2(Java.NewClassInstance nci) |
private IClass |
UnitCompiler.compileGet2(Java.NewInitializedArray nia) |
private IClass |
UnitCompiler.compileGet2(Java.ParameterAccess pa) |
private IClass |
UnitCompiler.compileGet2(Java.ParenthesizedExpression pe) |
private IClass |
UnitCompiler.compileGet2(Java.QualifiedThisReference qtr) |
private IClass |
UnitCompiler.compileGet2(Java.SimpleConstant sl) |
private IClass |
UnitCompiler.compileGet2(Java.SuperclassFieldAccessExpression scfae) |
private IClass |
UnitCompiler.compileGet2(Java.SuperclassMethodInvocation scmi) |
private IClass |
UnitCompiler.compileGet2(Java.ThisReference tr) |
private IClass |
UnitCompiler.compileGet2(Java.UnaryOperation uo) |
private IClass |
UnitCompiler.compileGetValue(Java.Rvalue rv)
Convenience function that calls
#compileContext(Rvalue) and #compileGet(Rvalue) . |
private IClass |
UnitCompiler.compileStringConcatenation(Java.Locatable locatable,
IClass type,
Java.Rvalue operand,
java.util.Iterator<Java.Rvalue> operands) |
private IClass |
UnitCompiler.convertToPrimitiveNumericType(Java.Locatable locatable,
IClass type)
If the given type is a primitive type, return that type.
|
private IClass |
Compiler.CompilerIClassLoader.defineIClassFromClassFileResource(Resource classFileResource)
Open the given
classFileResource , read its contents, define it in the
IClassLoader , and resolve it (this step may involve loading more classes). |
private IClass |
Compiler.CompilerIClassLoader.defineIClassFromSourceResource(Resource sourceResource,
java.lang.String className)
Parse the compilation unit stored in the given
sourceResource , remember it in
Compiler.this.parsedCompilationUnits (it may declare other classes that
are needed later), find the declaration of the type with the given
className , and define it in the IClassLoader . |
IClass |
UnitCompiler.findClass(java.lang.String className)
Find one class or interface declared in this compilation unit by name.
|
protected IClass |
ResourceFinderIClassLoader.findIClass(java.lang.String descriptor) |
IClass |
JavaSourceIClassLoader.findIClass(java.lang.String fieldDescriptor) |
protected abstract IClass |
IClassLoader.findIClass(java.lang.String descriptor)
|
protected IClass |
Compiler.CompilerIClassLoader.findIClass(java.lang.String type) |
protected IClass |
ClassLoaderIClassLoader.findIClass(java.lang.String descriptor) |
private IClass |
UnitCompiler.findMemberType(IClass iClass,
java.lang.String name,
Location location)
Finds a named type in the given
IClass . |
(package private) IClass[] |
IClass.findMemberType(java.lang.String optionalName)
|
private IClass |
UnitCompiler.findTypeByFullyQualifiedName(Location location,
java.lang.String[] identifiers)
Attempts to load an
IClass by fully-qualified name through UnitCompiler.iClassLoader . |
private IClass |
UnitCompiler.findTypeByName(Location location,
java.lang.String className)
Find the named
IClass in this compilation unit, or through the UnitCompiler.iClassLoader . |
IClass |
IClass.getArrayIClass(IClass objectType)
Get an
IClass that represents an array of this type. |
IClass |
IClass.getArrayIClass(int n,
IClass objectType)
Get an
IClass that represents an n-dimensional array of this type. |
private IClass |
IClass.getArrayIClass2(IClass objectType) |
IClass |
IClass.getComponentType() |
protected IClass |
ReflectionIClass.getComponentType2() |
protected abstract IClass |
IClass.getComponentType2() |
protected IClass |
IClass.PrimitiveIClass.getComponentType2() |
protected IClass |
ClassFileIClass.getComponentType2() |
IClass[] |
IClass.getDeclaredIClasses()
Returns the classes and interfaces declared as members of the class
(but not inherited classes and interfaces).
Returns an empty array for an array, primitive type or "void". |
protected IClass[] |
ReflectionIClass.getDeclaredIClasses2() |
protected abstract IClass[] |
IClass.getDeclaredIClasses2() |
protected IClass[] |
IClass.PrimitiveIClass.getDeclaredIClasses2() |
protected IClass[] |
ClassFileIClass.getDeclaredIClasses2() |
IClass |
IClass.getDeclaringIClass() |
IClass |
IClass.IMember.getDeclaringIClass() |
IClass |
IClass.IInvocable.getDeclaringIClass() |
IClass |
IClass.IField.getDeclaringIClass() |
protected IClass |
ReflectionIClass.getDeclaringIClass2() |
protected abstract IClass |
IClass.getDeclaringIClass2() |
protected IClass |
IClass.PrimitiveIClass.getDeclaringIClass2() |
protected IClass |
ClassFileIClass.getDeclaringIClass2() |
private IClass |
UnitCompiler.getIClass(Java.ThisReference tr) |
IClass[] |
IClass.getInterfaces()
Returns the interfaces implemented by the class.
Returns the superinterfaces of the interface. Returns "Cloneable" and "Serializable" for arrays. Returns an empty array for primitive types and "void". |
protected IClass[] |
ReflectionIClass.getInterfaces2() |
protected abstract IClass[] |
IClass.getInterfaces2() |
protected IClass[] |
IClass.PrimitiveIClass.getInterfaces2() |
protected IClass[] |
ClassFileIClass.getInterfaces2() |
IClass |
IClass.getOuterIClass()
The following types have an "outer class":
Anonymous classes declared in a non-static method of a class
Local classes declared in a non-static method of a class
Non-static member classes
|
protected IClass |
ReflectionIClass.getOuterIClass2() |
protected abstract IClass |
IClass.getOuterIClass2() |
protected IClass |
IClass.PrimitiveIClass.getOuterIClass2() |
protected IClass |
ClassFileIClass.getOuterIClass2() |
IClass[] |
IClass.IInvocable.getParameterTypes()
Returns the types of the parameters of this constructor or method.
|
IClass[] |
ReflectionIClass.ReflectionIConstructor.getParameterTypes2() |
IClass[] |
ReflectionIClass.ReflectionIMethod.getParameterTypes2() |
abstract IClass[] |
IClass.IInvocable.getParameterTypes2() |
abstract IClass[] |
IClass.IConstructor.getParameterTypes2()
Opposed to
Constructor.getParameterTypes() , the
return value of this method does not include the optionally leading "synthetic
parameters". |
private IClass |
UnitCompiler.getReferenceType(Location location,
Java.Scope scope,
java.lang.String[] identifiers,
int n) |
private IClass |
UnitCompiler.getReferenceType(Location location,
java.lang.String simpleTypeName,
Java.Scope scope)
JLS7 6.5.5.1 Simple type name (single identifier)
|
IClass |
ReflectionIClass.ReflectionIMethod.getReturnType() |
abstract IClass |
IClass.IMethod.getReturnType() |
private IClass |
UnitCompiler.getReturnType(Java.FunctionDeclarator fd) |
IClass |
IClass.getSuperclass()
Returns the superclass of the class.
Returns "null" for class "Object", interfaces, arrays, primitive types and "void". |
protected IClass |
ReflectionIClass.getSuperclass2() |
protected abstract IClass |
IClass.getSuperclass2() |
protected IClass |
IClass.PrimitiveIClass.getSuperclass2() |
protected IClass |
ClassFileIClass.getSuperclass2() |
private IClass |
UnitCompiler.getTargetIClass(Java.QualifiedThisReference qtr) |
IClass[] |
IClass.IInvocable.getThrownExceptions()
Returns the types thrown by this constructor or method.
|
IClass[] |
ReflectionIClass.ReflectionIConstructor.getThrownExceptions2() |
IClass[] |
ReflectionIClass.ReflectionIMethod.getThrownExceptions2() |
abstract IClass[] |
IClass.IInvocable.getThrownExceptions2() |
IClass |
UnitCompiler.SimpleIField.getType() |
IClass |
ReflectionIClass.ReflectionIField.getType() |
IClass |
Java.LocalVariableSlot.getType() |
abstract IClass |
IClass.IField.getType() |
private IClass |
UnitCompiler.getType(Java.Atom a) |
private IClass |
UnitCompiler.getType2(Java.AmbiguousName an) |
private IClass |
UnitCompiler.getType2(Java.ArrayAccessExpression aae) |
private IClass |
UnitCompiler.getType2(Java.ArrayLength al) |
private IClass |
UnitCompiler.getType2(Java.ArrayType at) |
private IClass |
UnitCompiler.getType2(Java.Assignment a) |
private IClass |
UnitCompiler.getType2(Java.BasicType bt) |
private IClass |
UnitCompiler.getType2(Java.BinaryOperation bo) |
private IClass |
UnitCompiler.getType2(Java.BooleanLiteral bl) |
private IClass |
UnitCompiler.getType2(Java.Cast c) |
private IClass |
UnitCompiler.getType2(Java.CharacterLiteral cl) |
private IClass |
UnitCompiler.getType2(Java.ClassLiteral cl) |
private IClass |
UnitCompiler.getType2(Java.ConditionalExpression ce) |
private IClass |
UnitCompiler.getType2(Java.Crement c) |
private IClass |
UnitCompiler.getType2(Java.FieldAccess fa) |
private IClass |
UnitCompiler.getType2(Java.FieldAccessExpression fae) |
private IClass |
UnitCompiler.getType2(Java.FloatingPointLiteral fpl) |
private IClass |
UnitCompiler.getType2(Java.Instanceof io) |
private IClass |
UnitCompiler.getType2(Java.IntegerLiteral il) |
private IClass |
UnitCompiler.getType2(Java.LocalVariableAccess lva) |
private IClass |
UnitCompiler.getType2(Java.MethodInvocation mi) |
private IClass |
UnitCompiler.getType2(Java.NewAnonymousClassInstance naci) |
private IClass |
UnitCompiler.getType2(Java.NewArray na) |
private IClass |
UnitCompiler.getType2(Java.NewClassInstance nci) |
private IClass |
UnitCompiler.getType2(Java.NewInitializedArray nia) |
private IClass |
UnitCompiler.getType2(Java.NullLiteral nl) |
private IClass |
UnitCompiler.getType2(Java.Package p) |
private IClass |
UnitCompiler.getType2(Java.ParameterAccess pa) |
private IClass |
UnitCompiler.getType2(Java.ParenthesizedExpression pe) |
private IClass |
UnitCompiler.getType2(Java.QualifiedThisReference qtr) |
private IClass |
UnitCompiler.getType2(Java.ReferenceType rt) |
private IClass |
UnitCompiler.getType2(Java.RvalueMemberType rvmt) |
private IClass |
UnitCompiler.getType2(Java.SimpleConstant sl) |
private IClass |
UnitCompiler.getType2(Java.SimpleType st) |
private IClass |
UnitCompiler.getType2(Java.StringLiteral sl) |
private IClass |
UnitCompiler.getType2(Java.SuperclassFieldAccessExpression scfae) |
private IClass |
UnitCompiler.getType2(Java.SuperclassMethodInvocation scmi) |
private IClass |
UnitCompiler.getType2(Java.ThisReference tr) |
private IClass |
UnitCompiler.getType2(Java.UnaryOperation uo) |
private IClass |
UnitCompiler.getUnboxedType(IClass type) |
private IClass |
UnitCompiler.importSingleType(java.lang.String simpleTypeName,
Location location)
If the given name was declared in a simple type import, load that class.
|
IClass |
UnitCompiler.importTypeOnDemand(java.lang.String simpleTypeName,
Location location)
6.5.2.BL1.B1.B5, 6.5.2.BL1.B1.B6 Type-import-on-demand.
6.5.5.1.6 Type-import-on-demand declaration. |
private IClass |
UnitCompiler.isBoxingConvertible(IClass sourceType) |
private IClass |
UnitCompiler.isUnboxingConvertible(IClass sourceType) |
private IClass |
UnitCompiler.load(Java.Locatable locatable,
Java.LocalVariable localVariable) |
IClass |
IClassLoader.loadIClass(java.lang.String fieldDescriptor)
Get an
IClass by field descriptor. |
private IClass |
UnitCompiler.newArray(Java.Locatable locatable,
int dimExprCount,
int dims,
IClass componentType)
Expects
dimExprCount values of type int on the operand stack. |
private IClass |
UnitCompiler.pushConstant(Java.Locatable locatable,
java.lang.Object value) |
private IClass |
UnitCompiler.resolve(Java.TypeDeclaration td) |
private IClass |
ClassFileIClass.resolveClass(short index) |
private IClass |
ClassFileIClass.resolveClass(java.lang.String descriptor) |
private IClass[] |
ClassFileIClass.resolveClasses(short[] ifs) |
private IClass |
UnitCompiler.unaryNumericPromotion(Java.Locatable locatable,
IClass type)
Implements "unary numeric promotion" (JLS7 5.6.1).
|
private IClass |
UnitCompiler.unaryNumericPromotionType(Java.Locatable locatable,
IClass type) |
Modifier and Type | Method and Description |
---|---|
Java.LocalVariableSlot |
CodeContext.allocateLocalVariable(short size,
java.lang.String name,
IClass type)
Allocate space for a local variable of the given size (1 or 2)
on the local variable array.
|
private void |
UnitCompiler.assignmentConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType,
java.lang.Object optionalConstantValue)
Implements "assignment conversion" (JLS7 5.2).
|
private java.lang.Object |
UnitCompiler.assignmentConversion(Java.Locatable locatable,
java.lang.Object value,
IClass targetType)
Implements "assignment conversion" (JLS7 5.2) on a constant value.
|
private IClass |
UnitCompiler.binaryNumericPromotion(Java.Locatable locatable,
IClass type1,
CodeContext.Inserter convertInserter1,
IClass type2)
Implements "binary numeric promotion" (5.6.2)
|
private IClass |
UnitCompiler.binaryNumericPromotion(Java.Locatable locatable,
IClass type1,
CodeContext.Inserter convertInserter1,
IClass type2,
CodeContext.Inserter convertInserter2)
Implements "binary numeric promotion" (5.6.2), which may perform unboxing conversion.
|
private IClass |
UnitCompiler.binaryNumericPromotionType(Java.Locatable locatable,
IClass type1,
IClass type2) |
private void |
UnitCompiler.boxingConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private void |
UnitCompiler.checkAccessible(IClass iClassDeclaringMember,
Access memberAccess,
Java.BlockStatement contextBlockStatement)
Verifies that a member (class, interface, field or method) declared in a given class is accessible from a given
block statement context, according to JLS7 6.6.1.4.
|
private void |
UnitCompiler.checkAccessible(IClass type,
Java.BlockStatement contextBlockStatement)
Checks whether the given
IClass is accessible in the given context, according to JLS7 6.6.1.2 and
6.6.1.4. |
private void |
UnitCompiler.checkThrownException(Java.Locatable locatable,
IClass type,
Java.Scope scope) |
private IClass |
UnitCompiler.compileArithmeticBinaryOperation(Java.Locatable locatable,
IClass lhsType,
java.lang.String operator,
Java.Rvalue rhs)
The LHS operand of type
lhsType is expected on the stack. |
private IClass |
UnitCompiler.compileArithmeticOperation(Java.Locatable locatable,
IClass type,
java.util.Iterator<Java.Rvalue> operands,
java.lang.String operator)
Execute an arithmetic operation on a sequence of
operands . |
private void |
UnitCompiler.compileGetValue(Java.ArrayInitializer ai,
IClass arrayType) |
private IClass |
UnitCompiler.compileStringConcatenation(Java.Locatable locatable,
IClass type,
Java.Rvalue operand,
java.util.Iterator<Java.Rvalue> operands) |
private IClass |
UnitCompiler.convertToPrimitiveNumericType(Java.Locatable locatable,
IClass type)
If the given type is a primitive type, return that type.
|
protected void |
IClassLoader.defineIClass(IClass iClass)
Define an
IClass in the context of this IClassLoader . |
private void |
UnitCompiler.dupx(Java.Locatable locatable,
IClass type,
int x) |
private IClass.IMethod |
UnitCompiler.fakeIMethod(IClass targetType,
java.lang.String name,
Java.Rvalue[] arguments) |
IClass.IConstructor |
IClass.findIConstructor(IClass[] parameterTypes) |
private IClass.IField |
UnitCompiler.findIField(IClass iClass,
java.lang.String name,
Location location)
Finds a named field in the given
IClass . |
private IClass.IMethod |
UnitCompiler.findIMethod(IClass targetType,
Java.Invocation invocation)
Find a
IClass.IMethod in the given targetType , its superclasses or superinterfaces with the
given name and for the given arguments . |
IClass.IMethod |
IClass.findIMethod(java.lang.String methodName,
IClass[] parameterTypes) |
private IClass |
UnitCompiler.findMemberType(IClass iClass,
java.lang.String name,
Location location)
Finds a named type in the given
IClass . |
IClass.IInvocable |
UnitCompiler.findMostSpecificIInvocable(Java.Locatable locatable,
IClass.IInvocable[] iInvocables,
IClass[] argumentTypes,
boolean boxingPermitted,
Java.Scope contextScope)
Determine the applicable invocables and choose the most specific invocable.
|
IClass |
IClass.getArrayIClass(IClass objectType)
Get an
IClass that represents an array of this type. |
IClass |
IClass.getArrayIClass(int n,
IClass objectType)
Get an
IClass that represents an n-dimensional array of this type. |
private IClass |
IClass.getArrayIClass2(IClass objectType) |
static java.lang.String[] |
IClass.getDescriptors(IClass[] iClasses)
Convenience method that determines the field descriptors of an array of
IClass es. |
void |
UnitCompiler.getIMethods(IClass type,
java.lang.String methodName,
java.util.List<IClass.IMethod> v)
Add all methods with the given
methodName that are declared by the type , its superclasses and
all their superinterfaces to the result list v . |
private IClass |
UnitCompiler.getUnboxedType(IClass type) |
private boolean |
UnitCompiler.hasAnnotation(Java.FunctionDeclarator fd,
IClass methodAnnotation) |
boolean |
IClass.hasIMethod(java.lang.String methodName,
IClass[] parameterTypes) |
private static int |
UnitCompiler.ilfd(IClass t) |
private static int |
UnitCompiler.ilfd(IClass t,
int opcodeInt,
int opcodeLong,
int opcodeFloat,
int opcodeDouble) |
private static int |
UnitCompiler.ilfda(IClass t) |
private static int |
UnitCompiler.ilfdabcs(IClass t) |
boolean |
IClass.implementsInterface(IClass that)
If
this represents a class: Return true if this class
directly or indirectly implements that interface. |
private java.lang.String |
UnitCompiler.internalCheckAccessible(IClass iClassDeclaringMember,
Access memberAccess,
Java.Scope contextScope) |
private java.lang.String |
UnitCompiler.internalCheckAccessible(IClass type,
Java.Scope contextScope) |
private void |
UnitCompiler.invokeConstructor(Java.Locatable locatable,
Java.Scope scope,
Java.Rvalue optionalEnclosingInstance,
IClass targetClass,
Java.Rvalue[] arguments)
Expects the object to initialize on the stack.
|
private boolean |
UnitCompiler.isAccessible(IClass iClassDeclaringMember,
Access memberAccess,
Java.Scope contextScope)
Determines whether a member (class, interface, field or method) declared in a given class is accessible from a
given block statement context, according to JLS7 6.6.1.4.
|
private boolean |
UnitCompiler.isAccessible(IClass type,
Java.Scope contextScope)
Determines whether the given
IClass is accessible in the given context, according to JLS7 6.6.1.2 and
6.6.1.4. |
boolean |
IClass.isAssignableFrom(IClass that)
Determine if "this" is assignable from "that".
|
private IClass |
UnitCompiler.isBoxingConvertible(IClass sourceType) |
private boolean |
UnitCompiler.isCastReferenceConvertible(IClass sourceType,
IClass targetType)
JLS7 5.5
|
private boolean |
UnitCompiler.isConvertibleToPrimitiveNumeric(IClass sourceType) |
private boolean |
UnitCompiler.isIdentityConvertible(IClass sourceType,
IClass targetType)
Checks whether "identity conversion" (5.1.1) is possible.
|
private boolean |
UnitCompiler.isMethodInvocationConvertible(IClass sourceType,
IClass targetType,
boolean boxingPermitted)
Checks if "method invocation conversion" (5.3) is possible.
|
private boolean |
UnitCompiler.isNarrowingPrimitiveConvertible(IClass sourceType,
IClass targetType)
Checks whether "narrowing primitive conversion" (JLS7 5.1.3) is possible.
|
private boolean |
UnitCompiler.isNarrowingReferenceConvertible(IClass sourceType,
IClass targetType)
Check whether "narrowing reference conversion" (JLS7 5.1.5) is possible.
|
boolean |
IClass.isSubclassOf(IClass that)
Returns
true if this class is an immediate or non-immediate
subclass of that class. |
private IClass |
UnitCompiler.isUnboxingConvertible(IClass sourceType) |
private boolean |
UnitCompiler.isWideningPrimitiveConvertible(IClass sourceType,
IClass targetType) |
private boolean |
UnitCompiler.isWideningReferenceConvertible(IClass sourceType,
IClass targetType)
Checks if "widening reference conversion" (5.1.4) is possible.
|
private void |
UnitCompiler.leave(Java.BlockStatement bs,
IClass optionalStackValueType)
Clean up the statement context.
|
private void |
UnitCompiler.leave2(Java.BlockStatement bs,
IClass optionalStackValueType) |
private void |
UnitCompiler.leave2(Java.SynchronizedStatement ss,
IClass optionalStackValueType) |
private void |
UnitCompiler.leave2(Java.TryStatement ts,
IClass optionalStackValueType) |
private void |
UnitCompiler.leaveStatements(Java.Scope from,
Java.Scope to,
IClass optionalStackValueType)
Statements that jump out of blocks ("return", "break", "continue") must call this method to make sure that the
"finally" clauses of all "try...catch" statements are executed.
|
private void |
UnitCompiler.load(Java.Locatable locatable,
IClass type,
int index) |
private IClass |
UnitCompiler.newArray(Java.Locatable locatable,
int dimExprCount,
int dims,
IClass componentType)
Expects
dimExprCount values of type int on the operand stack. |
private void |
UnitCompiler.numericPromotion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private boolean |
UnitCompiler.overridesMethod(IClass.IMethod method,
IClass type) |
private boolean |
UnitCompiler.overridesMethodFromSupertype(IClass.IMethod m,
IClass type) |
private void |
UnitCompiler.pop(Java.Locatable locatable,
IClass type) |
private void |
UnitCompiler.referenceThis(Java.Locatable locatable,
Java.ClassDeclaration declaringClass,
Java.TypeBodyDeclaration declaringTypeBodyDeclaration,
IClass targetIClass) |
private void |
UnitCompiler.reverseUnaryNumericPromotion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private void |
UnitCompiler.store(Java.Locatable locatable,
IClass lvType,
short lvIndex) |
private void |
UnitCompiler.stringConversion(Java.Locatable locatable,
IClass sourceType)
Converts object of type "sourceType" to type "String" (JLS7 15.18.1.1).
|
private boolean |
UnitCompiler.tryAssignmentConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType,
java.lang.Object optionalConstantValue) |
private boolean |
UnitCompiler.tryBoxingConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private boolean |
UnitCompiler.tryConstantAssignmentConversion(Java.Locatable locatable,
java.lang.Object constantValue,
IClass targetType)
Check if "constant assignment conversion" (JLS7 5.2, paragraph 1) is possible.
|
private boolean |
UnitCompiler.tryIdentityConversion(IClass sourceType,
IClass targetType)
Implements "identity conversion" (5.1.1).
|
private boolean |
UnitCompiler.tryNarrowingPrimitiveConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType)
Implements "narrowing primitive conversion" (JLS7 5.1.3).
|
private boolean |
UnitCompiler.tryNarrowingReferenceConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType)
Implements "narrowing reference conversion" (5.1.5).
|
private boolean |
UnitCompiler.tryUnboxingConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType,
CodeContext.Inserter optionalInserter) |
private boolean |
UnitCompiler.tryWideningPrimitiveConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType)
Implements "widening primitive conversion" (5.1.2).
|
private boolean |
UnitCompiler.tryWideningReferenceConversion(IClass sourceType,
IClass targetType)
Performs "widening reference conversion" (5.1.4) if possible.
|
private IClass |
UnitCompiler.unaryNumericPromotion(Java.Locatable locatable,
IClass type)
Implements "unary numeric promotion" (JLS7 5.6.1).
|
private IClass |
UnitCompiler.unaryNumericPromotionType(Java.Locatable locatable,
IClass type) |
private void |
UnitCompiler.unboxingConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private void |
UnitCompiler.unboxingConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType,
CodeContext.Inserter optionalInserter) |
Modifier and Type | Method and Description |
---|---|
private void |
IClass.findMemberType(java.lang.String optionalName,
java.util.Collection<IClass> result) |
Constructor and Description |
---|
LocalVariable(boolean finaL,
IClass type) |
LocalVariableSlot(java.lang.String name,
short slotNumber,
IClass type) |
NewClassInstance(Location location,
Java.Rvalue optionalQualification,
IClass iClass,
Java.Rvalue[] arguments) |
NewInitializedArray(Location location,
IClass arrayIClass,
Java.ArrayInitializer arrayInitializer) |
SimpleIField(IClass declaringIClass,
java.lang.String name,
IClass type) |
SimpleType(Location location,
IClass iClass) |
Modifier and Type | Method and Description |
---|---|
protected IClass |
JGrep.JGrepIClassLoader.findIClass(java.lang.String type) |