public class TypeExpansion
extends java.lang.Object
| Constructor and Description |
|---|
TypeExpansion(java.lang.String type)
Creates an empty type expansion.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addZenExpandMethod(java.lang.String name,
ParsedExpansion expansion) |
Expression |
binary(ZenPosition position,
IEnvironmentGlobal environment,
Expression left,
Expression right,
OperatorType operator)
Retrieves a binary operator from this expansion.
|
void |
compileAnyCanCastImplicit(ZenType type,
MethodOutput output,
IEnvironmentGlobal environment,
int localClass) |
void |
compileAnyCast(ZenType type,
MethodOutput output,
IEnvironmentGlobal environment,
int localValue,
int localClass) |
boolean |
compileAnyUnary(MethodOutput output,
OperatorType type,
IEnvironmentMethod environment) |
void |
constructCastingRules(IEnvironmentGlobal environment,
ICastingRuleDelegate rules)
Registers all casting rules to the given delegate.
|
void |
expand(java.lang.Class<?> cls,
ITypeRegistry types)
Added a native type expansion.
|
ZenExpandCaster |
getCaster(ZenType type,
IEnvironmentGlobal environment)
Retrieves a caster from this expansion.
|
IPartialExpression |
instanceMember(ZenPosition position,
IEnvironmentGlobal environment,
Expression value,
java.lang.String member)
Retrieves an instance member from this expansion.
|
IPartialExpression |
staticMember(ZenPosition position,
IEnvironmentGlobal environment,
java.lang.String member)
Retrieves a static member from this expansion.
|
Expression |
ternary(ZenPosition position,
IEnvironmentGlobal environment,
Expression first,
Expression second,
Expression third,
OperatorType operator)
Retrieves a ternary operator from this expansion.
|
Expression |
unary(ZenPosition position,
IEnvironmentGlobal environment,
Expression value,
OperatorType operator)
Retrieves a unary operator from this expansion.
|
public TypeExpansion(java.lang.String type)
type - type namepublic void expand(java.lang.Class<?> cls,
ITypeRegistry types)
cls - expanding classtypes - type registrypublic void addZenExpandMethod(java.lang.String name,
ParsedExpansion expansion)
public void constructCastingRules(IEnvironmentGlobal environment, ICastingRuleDelegate rules)
environment - compilation environmentrules - target delegatepublic ZenExpandCaster getCaster(ZenType type, IEnvironmentGlobal environment)
type - target typeenvironment - compilation environmentpublic Expression unary(ZenPosition position, IEnvironmentGlobal environment, Expression value, OperatorType operator)
position - calling positionenvironment - compile environmentvalue - argument valueoperator - unary operatorpublic Expression binary(ZenPosition position, IEnvironmentGlobal environment, Expression left, Expression right, OperatorType operator)
position - calling positionenvironment - compile environmentleft - first argument value (left side)right - second argument value (right side)operator - binary operatorpublic Expression ternary(ZenPosition position, IEnvironmentGlobal environment, Expression first, Expression second, Expression third, OperatorType operator)
position - calling positionenvironment - compile environmentfirst - first argument valuesecond - second argument valuethird - third arugment valueoperator - ternary operatorpublic IPartialExpression instanceMember(ZenPosition position, IEnvironmentGlobal environment, Expression value, java.lang.String member)
position - calling positionenvironment - compile environmentvalue - instance valuemember - member namepublic IPartialExpression staticMember(ZenPosition position, IEnvironmentGlobal environment, java.lang.String member)
position - calling positionenvironment - compile environmentmember - member namepublic void compileAnyCast(ZenType type, MethodOutput output, IEnvironmentGlobal environment, int localValue, int localClass)
public void compileAnyCanCastImplicit(ZenType type, MethodOutput output, IEnvironmentGlobal environment, int localClass)
public boolean compileAnyUnary(MethodOutput output, OperatorType type, IEnvironmentMethod environment)