public abstract class AbstractMemberExpansionTransformer<T extends IMemberAccessExpression> extends AbstractExpressionTransformer<T>
CAPTURED_VAR_PREFIX, CTX_SYMBOL, CTX_SYMBOL_SUFFIX, CUSTOM_RUNTIMES, EMPTY_CLASS_ARRAY, ENHANCEMENT_THIS_REF, ENHANCEMENT_TYPE_PARAM_PREFIX, ENUM_PARAM_PREFIX, OBJECT_TYPE, OUTER_ACCESS, TYPE_PARAM_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMemberExpansionTransformer(TopLevelTransformationContext cc,
T expr) |
| Modifier and Type | Method and Description |
|---|---|
static Collection |
arrayToCollection(Object value) |
protected IRExpression |
compile_impl() |
protected IRExpression |
compileExpansionDirectlyToArray(IType rootType,
IType rootComponentType,
IType resultType,
IType resultCompType)
If this method is being called, it means we're expanding a one-dimensional array or collection, with a right hand side
that evaluates to a property that's not an array or collection.
|
protected IRExpression |
compileExpansionUsingArrayList(IType rootType,
IType rootComponentType,
IType resultType,
IType resultCompType,
IType propertyType)
This method will compile the expansion using an ArrayList to collect temporary results.
|
protected IRExpression |
compileExpansionWithNoReturnValue(IType rootType,
IType rootComponentType,
IType resultType,
IType resultCompType) |
protected abstract IRExpression |
createIterationExpr(IType rootComponentType,
String identifierName,
IType identifierType,
IType compType)
Subclassers need only implement this method for the iteration expression i.e., the singular form of the expansion expr.
|
protected abstract IType |
getPropertyOrMethodType(IType rootComponentType,
IType compType) |
static Object |
listToArray(List l,
Class compType) |
static Object |
listToArray(List l,
IType compType) |
static boolean[] |
listToPrimitiveArray_boolean(List l) |
static byte[] |
listToPrimitiveArray_byte(List l) |
static char[] |
listToPrimitiveArray_char(List l) |
static double[] |
listToPrimitiveArray_double(List l) |
static float[] |
listToPrimitiveArray_float(List l) |
static int[] |
listToPrimitiveArray_int(List l) |
static long[] |
listToPrimitiveArray_long(List l) |
static short[] |
listToPrimitiveArray_short(List l) |
_expr, compile, pushArgumentsNoCasting, pushArgumentsWithCasting, shortCircuitValue_cc, assignStructuralTypeOwner, avoidVerifyError, booleanLiteral, boxValue, boxValue, boxValueToType, buildAddition, buildArithmetic, buildArrayLength, buildArrayLoad, buildArrayLoad, buildArrayStore, buildAssignment, buildCast, buildComposite, buildComposite, buildEquals, buildFieldGet, buildFieldSet, buildGreaterThan, buildIf, buildIfElse, buildInitializedArray, buildMethodCall, buildMethodCall, buildMethodCall, buildNegation, buildNewExpression, buildNewExpression, buildNewExpression, buildNotEquals, buildNullCheckTernary, buildReturn, buildSubtraction, buildTernary, buildThrow, callMethod, callMethod, callMethod, callMethod, callMethod, callSpecialMethod, callSpecialMethod, callSpecialMethod, callStaticMethod, castResultingTypeIfNecessary, charLiteral, checkCast, checkCast, checkCast, classLiteral, classLiteral, classLiteral, clearCustomRuntimes, collectArgsIntoObjArray, convertBoxedNullToPrimitive, convertNullToPrimitive, convertOperandToBig, convertOperandToPrimitive, convertOperandToRational, exprList, fastStringCoercion, findComparableParamType, findDimensionType, getActualPropertyInfo, getCapturedSymbolParameterName, getClassInfos, getConcreteType, getConstructorParamTypes, getCustomRuntime, getDeclaredField, getDeclaredFieldImpl, getDeclaredMethod, getDeclaredMethod, getDefaultConstIns, getDescriptor, getDescriptor, getDescriptor, getDescriptor, getEnclosingDFS, getField_new, getField, getGosuClass, getInstanceField, getIRTypes, getIRTypes, getModifiers, getParsedElement, getRuntimeEnclosingType, getStaticField, getTypes, getTypeVarParamName, getTypeVarsForDFS, handleCustomExpressionRuntime, handleNamedArgs, identifier, initLocalVar, initLocalVarWithDefault, initMultiArray, inStaticContext, isBigType, isBoxedIntType, isBytecodeType, isBytecodeType, isCheckedArithmeticEnabled, isCompilingEnhancement, isEnhancementType, isEvalProgram, isExecuteMethod, isHandledByCustomCoercion, isIntType, isMemberOnEnclosingType, isMemberOnEnhancementOfEnclosingType, isNonBigBoxedNumberType, isNonStaticInnerClass, isNumberType, isPrimitiveNumberType, isProgram, isProgramOrEnclosedInProgram, makeAnnotationInfos, makeArrayViaTypeInfo, makeEmptyArrayViaTypeInfo, makeIRSymbol, maybeUnwrapMetaType, newArray, nullCheckVar, nullLiteral, numberConvert, numberConvert, numericLiteral, pushArrayOfDefValueExpr, pushArrayOfString, pushArrayOfTypes, pushCapturedSymbols, pushConstant, pushEnumSuperConstructorArguments, pushExternalSymbolsMap, pushLazyType, pushLazyType, pushNull, pushOuter, pushOuter, pushOuter, pushParamTypes, pushRuntimeTypeOfTypeVar, pushString, pushThis, pushThisOrOuter, pushType, pushType, pushTypeParametersForConstructor, requiresExternalSymbolCapture, requiresImplicitEnhancementArg, requiresImplicitEnhancementArg, setCc, setField, setField, setInstanceField, setStaticField, stringLiteral, unboxValueFromType, unboxValueToType, unboxValueToType, valueOfprotected AbstractMemberExpansionTransformer(TopLevelTransformationContext cc, T expr)
protected abstract IRExpression createIterationExpr(IType rootComponentType, String identifierName, IType identifierType, IType compType)
protected abstract IType getPropertyOrMethodType(IType rootComponentType, IType compType)
protected IRExpression compile_impl()
compile_impl in class AbstractExpressionTransformer<T extends IMemberAccessExpression>protected IRExpression compileExpansionWithNoReturnValue(IType rootType, IType rootComponentType, IType resultType, IType resultCompType)
protected IRExpression compileExpansionDirectlyToArray(IType rootType, IType rootComponentType, IType resultType, IType resultCompType)
protected IRExpression compileExpansionUsingArrayList(IType rootType, IType rootComponentType, IType resultType, IType resultCompType, IType propertyType)
public static boolean[] listToPrimitiveArray_boolean(List l)
public static byte[] listToPrimitiveArray_byte(List l)
public static char[] listToPrimitiveArray_char(List l)
public static int[] listToPrimitiveArray_int(List l)
public static short[] listToPrimitiveArray_short(List l)
public static long[] listToPrimitiveArray_long(List l)
public static float[] listToPrimitiveArray_float(List l)
public static double[] listToPrimitiveArray_double(List l)
public static Collection arrayToCollection(Object value)
Copyright © 2018. All rights reserved.