| Package | Description |
|---|---|
| org.glassfish.pfl.dynamic.codegen.impl | |
| org.glassfish.pfl.dynamic.codegen.spi |
| Modifier and Type | Field and Description |
|---|---|
protected Type |
MethodInfoBase.rtype |
protected Type |
FieldInfoImpl.type |
| Modifier and Type | Field and Description |
|---|---|
protected List<Type> |
MethodInfoBase.exceptions |
| Modifier and Type | Method and Description |
|---|---|
Type |
ImportListImpl.addImport(String name)
Add a fully-qualified type name to the imports.
|
Type |
ExpressionFactory.NewArrExpression.ctype() |
Type |
ExpressionFactory.InstofExpression.itype() |
Type |
ImportListImpl.lookup(String className)
Lookup just the className, without package name.
|
Type |
MethodInfoBase.returnType() |
Type |
ClassInfoBase.superType() |
Type |
ExpressionFactory.NonStaticFieldAccessExpression.targetType() |
Type |
ExpressionFactory.StaticFieldAccessExpression.targetType() |
Type |
ClassInfoBase.thisType() |
Type |
FieldInfoImpl.type() |
Type |
ExpressionInternal.type() |
Type |
ExpressionFactory.ConstantExpression.type() |
Type |
ExpressionFactory.VoidExpression.type() |
Type |
ExpressionFactory.ThisExpression.type() |
Type |
ExpressionFactory.CallExpression.type() |
Type |
ExpressionFactory.UnaryOperatorExpression.type() |
Type |
ExpressionFactory.BinaryOperatorExpression.type() |
Type |
ExpressionFactory.CastExpression.type() |
Type |
ExpressionFactory.InstofExpression.type() |
Type |
ExpressionFactory.NewObjExpression.type() |
Type |
ExpressionFactory.NewArrExpression.type() |
Type |
ExpressionFactory.SuperCallExpression.type() |
Type |
ExpressionFactory.SuperObjExpression.type() |
Type |
ExpressionFactory.ThisObjExpression.type() |
Type |
ExpressionFactory.FieldAccessExpressionBase.type() |
Type |
ExpressionFactory.ArrayIndexExpression.type() |
Type |
ExpressionFactory.ArrayLengthExpression.type() |
Type |
ExpressionFactory.IfExpression.type() |
Type |
ExpressionFactory.VariableImpl.type() |
| Modifier and Type | Method and Description |
|---|---|
Map<Type,Pair<Variable,BlockStatement>> |
TryStatement.catches() |
List<Type> |
MethodInfoBase.exceptions() |
List<Type> |
ClassInfoBase.impls() |
| Modifier and Type | Method and Description |
|---|---|
ExpressionInternal |
ExpressionFactory._const(Type c) |
Variable |
MethodGenerator.addArgument(Type type,
String ident) |
Pair<Variable,BlockStatement> |
TryStatement.addCatch(Type type,
String ident)
Add a new Catch block to this try statement.
|
Expression |
BlockStatement.addDefinition(Type type,
String ident,
Expression value) |
FieldGenerator |
ClassGeneratorImpl.addField(int modifiers,
Type type,
String name) |
void |
ImportListImpl.addImport(Type type) |
static String |
ASMUtil.bcName(Type type) |
Expression |
ExpressionFactory.cast(Type type,
Expression expr) |
boolean |
ImportListImpl.contains(Type type) |
static ClassGeneratorImpl |
CodeGenerator.defineClass(int modifiers,
String name,
Type superType,
List<Type> impls)
Define a ClassGeneratorImpl for a class.
|
void |
ByteCodeUtility.emitCast(Type from,
Type to) |
void |
ByteCodeUtility.emitConstantExpression(Type type,
Object value) |
void |
ByteCodeUtility.emitConversion(Type from,
Type to) |
void |
ByteCodeUtility.emitExceptionTableEntry(org.glassfish.pfl.objectweb.asm.Label start,
org.glassfish.pfl.objectweb.asm.Label end,
org.glassfish.pfl.objectweb.asm.Label handler,
Type exceptionType) |
void |
ByteCodeUtility.emitInstanceof(Type type) |
void |
ByteCodeUtility.emitInvoke(Type type,
String name,
Signature sig)
Emit the appropriate non-static INVOKE instruction as follows:
If type is an interface, emit INVOKEINTERFACE.
|
void |
ByteCodeUtility.emitNewArrayCall(Type type) |
void |
ByteCodeUtility.emitNewCall(Type type)
Emit the NEW, DUP sequence required at the start of a new
call.
|
void |
ByteCodeUtility.emitNewInvoke(Type type,
Signature sig)
Emit the INVOKESPECIAL instruction for calling a constructor
with the given signature.
|
void |
ByteCodeUtility.emitSpecialInvoke(Type type,
String name,
Signature sig)
Emit the INVOKESPECIAL instruction for calling a method
with the given signature.
|
void |
ByteCodeUtility.emitStaticInvoke(Type type,
String name,
Signature sig)
Emit a static INVOKE instruction.
|
Expression |
ExpressionFactory.fieldAccess(Type target,
String fieldName) |
protected void |
ClassInfoBase.initializeClass(Type thisType,
Type superType,
List<Type> impls) |
Expression |
ExpressionFactory.instof(Expression expr,
Type type) |
Expression |
ExpressionFactory.newArr(Type type,
Expression size) |
Expression |
ExpressionFactory.newArrInit(Type type,
List<Expression> exprs) |
Expression |
ExpressionFactory.newObj(Type type,
List<Expression> exprs) |
Expression |
ExpressionFactory.newObj(Type type,
Signature signature,
List<Expression> args) |
MethodGenerator |
ClassGeneratorImpl.startMethod(int modifiers,
Type rtype,
String name,
List<Type> exceptions) |
Expression |
ExpressionFactory.staticCall(Type target,
String ident,
List<Expression> exprs)
Shorthand form to construct invocation that looks up Signature based
on the types of the expressions in exprs.
|
Expression |
ExpressionFactory.staticCall(Type target,
String ident,
Signature signature,
List<Expression> exprs)
Construct a representation of a static method invocation.
|
void |
TreeWalker.tryStatementBeforeBlock(TryStatement arg,
Type type,
Variable var,
BlockStatement block) |
void |
SourceStatementVisitor.tryStatementBeforeBlock(TryStatement arg,
Type type,
Variable var,
BlockStatement block) |
void |
NopVisitor.tryStatementBeforeBlock(TryStatement arg,
Type type,
Variable var,
BlockStatement block) |
void |
ASMSetupVisitor.tryStatementBeforeBlock(TryStatement arg,
Type type,
Variable var,
BlockStatement block) |
void |
ASMByteCodeVisitor.tryStatementBeforeBlock(TryStatement arg,
Type type,
Variable var,
BlockStatement block) |
int |
ByteCodeUtility.typeCode(Type type) |
Variable |
ExpressionFactory.variable(Type type,
String ident) |
| Modifier and Type | Method and Description |
|---|---|
static ClassGeneratorImpl |
CodeGenerator.defineClass(int modifiers,
String name,
Type superType,
List<Type> impls)
Define a ClassGeneratorImpl for a class.
|
static ClassGeneratorImpl |
CodeGenerator.defineInterface(int modifiers,
String name,
List<Type> impls)
Define a ClassGeneratorImpl for an interface.
|
protected void |
ClassInfoBase.initializeClass(Type thisType,
Type superType,
List<Type> impls) |
protected void |
ClassInfoBase.initializeInterface(List<Type> exts) |
MethodGenerator |
ClassGeneratorImpl.startConstructor(int modifiers,
List<Type> exceptions) |
MethodGenerator |
ClassGeneratorImpl.startMethod(int modifiers,
Type rtype,
String name,
List<Type> exceptions) |
| Constructor and Description |
|---|
ClassInfoBase(int modifiers,
Type thisType)
Construct a ClassInfoBase representing a class or interface.
|
ClassInfoReflectiveImpl(Type type) |
FieldGenerator(ClassGeneratorImpl cinfo,
int modifiers,
Type type,
String ident) |
FieldInfoImpl(ClassInfo cinfo,
int modifiers,
Type type,
String ident) |
MethodInfoBase(ClassInfo cinfo,
int modifiers,
Type rtype,
String name) |
| Modifier and Type | Method and Description |
|---|---|
static Type |
Wrapper._array(Type type)
Return a representation of the array type with the
given component type.
|
static Type |
Type._array(Type memberType) |
static Type |
Wrapper._boolean()
Return a representation of the boolean type.
|
static Type |
Type._boolean() |
static Type |
Wrapper._byte()
Return a representation of the byte type.
|
static Type |
Type._byte() |
static Type |
Wrapper._char()
Return a representation of the char type.
|
static Type |
Type._char() |
static Type |
Wrapper._Class()
Return a representation of the java.lang.Class type.
|
static Type |
Type._Class() |
static Type |
Type._class(String name)
Return a codegen Type representing a class with the given name.
|
static Type |
Type._classGenerator(ClassGenerator cg) |
static Type |
Type._Cloneable() |
static Type |
Wrapper._double()
Return a representation of the double type.
|
static Type |
Type._double() |
static Type |
Wrapper._float()
Return a representation of the float type.
|
static Type |
Type._float() |
static Type |
Wrapper._import(String name)
Used to create short names for types.
|
static Type |
Wrapper._int()
Return a representation of the int type.
|
static Type |
Type._int() |
static Type |
Wrapper._long()
Return a representation of the long type.
|
static Type |
Type._long() |
static Type |
Type._null() |
static Type |
Wrapper._nullType()
Return a representation of the null type.
|
static Type |
Wrapper._Object()
Return a representation of the java.lang.Object type.
|
static Type |
Type._Object() |
static Type |
Wrapper._short()
Return a representation of the short type.
|
static Type |
Type._short() |
static Type |
Wrapper._String()
Return a representation of the java.lang.String type.
|
static Type |
Type._String() |
static Type |
Wrapper._t(String name)
Return the reference type for the given class name.
|
static Type |
Wrapper._thisClass()
Return the type of the current class.
|
static Type |
Wrapper._void()
Return a representation of the void type.
|
static Type |
Type._void() |
Type |
ImportList.addImport(String name)
Add a fully-qualified type name to the imports.
|
Type |
Type.binaryPromotion(Type t)
Return the type that is the binary promotion of this
type and Type t.
|
static Type |
Primitives.getPrimitiveTypeForWrapper(Type type) |
static Type |
Primitives.getWrapperTypeForPrimitive(Type type) |
Type |
ImportList.lookup(String className)
Lookup just the className, without package name.
|
Type |
Type.memberType() |
Type |
Signature.returnType() |
Type |
MethodInfo.returnType()
Return the Type that is returned by this method.
|
Type |
ClassInfo.superType()
Return the Type of the supertype of this class.
|
Type |
ClassInfo.thisType()
Return the Type of the class represented by this
ClassInfo.
|
Type |
Variable.type()
Return the type of this variable.
|
Type |
FieldInfo.type()
Return the type of this Field.
|
static Type |
Type.type(Class cls)
Return the codegen Type that corresponds to the Java (non-generic)
Type represented by cls.
|
Type |
Type.unaryPromotion()
Return the type that is a unary promotion of this
type.
|
| Modifier and Type | Method and Description |
|---|---|
List<Type> |
Signature.argTypes() |
List<Type> |
MethodInfo.exceptions()
Return a list of all Exception types that are declared as being
throwable from this method.
|
List<Type> |
ClassInfo.impls()
Return the list of Types of interfaces implemented by this class.
|
| Modifier and Type | Method and Description |
|---|---|
static Expression |
Wrapper._arg(Type type,
String name)
Add an argument to the current method.
|
static Type |
Wrapper._array(Type type)
Return a representation of the array type with the
given component type.
|
static Type |
Type._array(Type memberType) |
static Expression |
Wrapper._call(Type target,
String ident,
Expression... args)
Generate a call to a static method, using the Java method
overload resolution algorithm to determine the signature.
|
static Expression |
Wrapper._call(Type target,
String ident,
List<Expression> args)
Generate a call to a static method, using the Java method
overload resolution algorithm to determine the signature.
|
static Expression |
Wrapper._call(Type target,
String ident,
Signature signature,
Expression... args)
Generate a call to a static method.
|
static Expression |
Wrapper._call(Type target,
String ident,
Signature signature,
List<Expression> args)
Generate a call to a static method.
|
static Expression |
Wrapper._cast(Type type,
Expression expr)
Create an expression representing the type cast of expr
to type.
|
static Expression |
Wrapper._catch(Type type,
String name)
Indicate the start of a catch clause in a try statement.
|
static void |
Wrapper._class(int modifiers,
String name,
Type superClass,
List<Type> impls)
Define a class.
|
static void |
Wrapper._class(int modifiers,
String name,
Type superClass,
Type... impls)
Define a class.
|
static void |
Wrapper._class(int modifiers,
String name,
Type superClass,
Type... impls)
Define a class.
|
static Expression |
Wrapper._const(Type c)
Return a constant expression representing the
value c.
|
static void |
Wrapper._constructor(int modifiers,
Type... exceptions)
Begin defining a constructor in the current class.
|
static Expression |
Wrapper._data(int modifiers,
Type type,
String name)
Define a data member in a class.
|
static Expression |
Wrapper._define(Type type,
String name,
Expression expr)
Indicates the introduction of a new local variable initialized to
the given expression.
|
static Expression |
Wrapper._field(Type type,
String fieldName)
Return an expression used to access a static data member in
a class given by the type.
|
static Expression |
Wrapper._instanceof(Expression expr,
Type type)
Create an expression representing the instanceof test of
expr and type (expr instanceof type).
|
static void |
Wrapper._interface(int modifiers,
String name,
Type... impls)
Define an interface.
|
static void |
Wrapper._method(int modifiers,
Type type,
String name,
List<Type> exceptions)
Begin defining a method in the current class.
|
static void |
Wrapper._method(int modifiers,
Type type,
String name,
Type... exceptions)
Begin defining a method in the current class.
|
static void |
Wrapper._method(int modifiers,
Type type,
String name,
Type... exceptions)
Begin defining a method in the current class.
|
static Expression |
Wrapper._new_array_init(Type type,
Expression... args)
Create an expression representing the construction of a
new array with the given component type using the given
expressions to initialize the array.
|
static Expression |
Wrapper._new_array_init(Type type,
List<Expression> args)
Create an expression representing the construction of a
new array with the given component type using the given
expressions to initialize the array.
|
static Expression |
Wrapper._new_array(Type type,
Expression size)
Create an expression representing the construction of a
new array of the given size with the given component type.
|
static Expression |
Wrapper._new(Type type,
Expression... args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
signature determined by the Java method overload resolution
algorithm and the list of expressions as arguments.
|
static Expression |
Wrapper._new(Type type,
List<Expression> args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
signature determined by the Java method overload resolution
algorithm and the list of expressions as arguments.
|
static Expression |
Wrapper._new(Type type,
Signature signature,
Expression... args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
given signature and the list of expressions as arguments.
|
static Expression |
Wrapper._new(Type type,
Signature signature,
List<Expression> args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
given signature and the list of expressions as arguments.
|
static Signature |
Wrapper._s(Type rtype,
List<Type> types)
Create a signature that may be used for calling a method or
constructor.
|
static Signature |
Wrapper._s(Type rtype,
Type... types)
Create a signature that may be used for calling a method or
constructor.
|
static Signature |
Wrapper._s(Type rtype,
Type... types)
Create a signature that may be used for calling a method or
constructor.
|
void |
ModifiableClass.addImplementedInterface(Type type) |
void |
ImportList.addImport(Type type) |
Type |
Type.binaryPromotion(Type t)
Return the type that is the binary promotion of this
type and Type t.
|
void |
Signature.checkCompatibility(Type targetType,
String ident,
List<Expression> args)
Check whether the list of expression in args is statically
compatible with this Signature.
|
void |
Signature.checkConstructorCompatibility(Type targetType,
List<Expression> args)
Check whether the list of expression in args is statically
compatible with this Signature.
|
void |
Signature.checkStaticCompatibility(Type targetType,
String ident,
List<Expression> args)
Check whether the list of expression in args is statically
compatible with this Signature.
|
boolean |
ImportList.contains(Type type) |
static Signature |
Signature.fromCall(Type type,
String ident,
List<Expression> exprs) |
static Signature |
Signature.fromCallUsingTypes(Type type,
String ident,
List<Type> types) |
static Signature |
Signature.fromConstructor(Type type,
List<Expression> exprs) |
static Signature |
Signature.fromConstructorUsingTypes(Type type,
List<Type> types) |
static Signature |
Signature.fromStaticCall(Type type,
String ident,
List<Expression> exprs) |
static Signature |
Signature.fromStaticCallUsingTypes(Type type,
String ident,
List<Type> types) |
static Type |
Primitives.getPrimitiveTypeForWrapper(Type type) |
static Type |
Primitives.getWrapperTypeForPrimitive(Type type) |
boolean |
Type.hasPrimitiveNarrowingConversionFrom(Type t)
Return true iff there is a primitive narrowing conversion
from Type t to this type.
|
boolean |
Type.hasPrimitiveWideningConversionFrom(Type t)
Return true iff there is a primitive widening conversion
from Type t to this type.
|
boolean |
Type.hasReferenceNarrowingConversionFrom(Type t)
Return true iff there is a reference narrowing conversion
from Type t to this type.
|
boolean |
Type.hasReferenceWideningConversionFrom(Type t)
Return true iff there is a reference widening conversion
from Type t to this type.
|
boolean |
Type.isAssignmentConvertibleFrom(Type t)
Return true iff there is an assignment conversion from
Type t to this type.
|
boolean |
Type.isCastingConvertibleFrom(Type t)
Return true iff there is a casting conversion from
Type t to this type.
|
boolean |
Type.isMethodInvocationConvertibleFrom(Type t)
Return true iff one of the following statements is true:
this.equals( t ) .
|
static Signature |
Signature.make(Type rtype,
List<Type> types) |
void |
ModifiableClass.setSuperType(Type type) |
| Modifier and Type | Method and Description |
|---|---|
static void |
Wrapper._class(int modifiers,
String name,
Type superClass,
List<Type> impls)
Define a class.
|
static void |
Wrapper._constructor(int modifiers,
List<Type> exceptions)
Begin defining a constructor in the current class.
|
static void |
Wrapper._interface(int modifiers,
String name,
List<Type> impls)
Define an interface.
|
static void |
Wrapper._method(int modifiers,
Type type,
String name,
List<Type> exceptions)
Begin defining a method in the current class.
|
static Signature |
Wrapper._s(Type rtype,
List<Type> types)
Create a signature that may be used for calling a method or
constructor.
|
static Signature |
Signature.fromCallUsingTypes(Type type,
String ident,
List<Type> types) |
static Signature |
Signature.fromConstructorUsingTypes(Type type,
List<Type> types) |
static Signature |
Signature.fromStaticCallUsingTypes(Type type,
String ident,
List<Type> types) |
static Signature |
Signature.make(Type rtype,
List<Type> types) |
Copyright © 2011–2018 Eclipse Foundation. All rights reserved.