Class Expression
java.lang.Object
org.openzen.zenscript.codemodel.expression.Expression
- All Implemented Interfaces:
IPartialExpression
- Direct Known Subclasses:
AndAndExpression,ArrayExpression,CallExpression,CallStaticExpression,CapturedExpression,CastExpression,CheckNullExpression,CoalesceExpression,CompareExpression,ConditionalExpression,ConstantBoolExpression,ConstantByteExpression,ConstantCharExpression,ConstantDoubleExpression,ConstantFloatExpression,ConstantIntExpression,ConstantLongExpression,ConstantSByteExpression,ConstantShortExpression,ConstantStringExpression,ConstantUIntExpression,ConstantULongExpression,ConstantUShortExpression,ConstantUSizeExpression,ConstExpression,ConstructorSuperCallExpression,ConstructorThisCallExpression,DummyExpression,EnumConstantExpression,FunctionExpression,GetFieldExpression,GetFunctionParameterExpression,GetLocalVariableExpression,GetMatchingVariantField,GetStaticFieldExpression,GetterExpression,GlobalCallExpression,GlobalExpression,InterfaceCastExpression,InvalidAssignExpression,InvalidExpression,IsExpression,JavaFunctionInterfaceCastExpression,MakeConstExpression,MapExpression,MatchExpression,NewExpression,NullExpression,OrOrExpression,PanicExpression,PostCallExpression,RangeExpression,SameObjectExpression,SetFieldExpression,SetFunctionParameterExpression,SetLocalVariableExpression,SetStaticFieldExpression,SetterExpression,StaticGetterExpression,StaticSetterExpression,SubtypeCastExpression,SupertypeCastExpression,ThisExpression,ThrowExpression,TryConvertExpression,TryRethrowAsExceptionExpression,TryRethrowAsResultExpression,VariantValueExpression,WrapOptionalExpression
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Expression[]final CodePositionfinal TypeIDfinal TypeID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaborts()Determines if this expression aborts execution; that is, it is either a throw or a panic expression.abstract <C,R> R accept(C context, ExpressionVisitorWithContext<C, R> visitor) abstract <T> Taccept(ExpressionVisitor<T> visitor) static TypeIDbinaryThrow(CodePosition position, TypeID left, TypeID right) call(CodePosition position, TypeScope scope, List<TypeID> hints, CallArguments arguments) castExplicit(CodePosition position, TypeScope scope, TypeID asType, boolean optional) castImplicit(CodePosition position, TypeScope scope, TypeID asType) eval()voidforEachStatement(Consumer<Statement> consumer) getMember(CodePosition position, TypeScope scope, List<TypeID> hints, GenericName name) getPossibleFunctionHeaders(TypeScope scope, List<TypeID> hints, int arguments) TypeID[]static TypeIDmultiThrow(CodePosition position, Expression[] expressions) abstract ExpressionpredictCallTypes(CodePosition position, TypeScope scope, List<TypeID> hints, int arguments) static Expression[]transform(Expression[] expressions, ExpressionTransformer transformer) abstract Expressiontransform(ExpressionTransformer transformer) final Expressiontransform(StatementTransformer transformer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openzen.zenscript.codemodel.partial.IPartialExpression
assign, capture, getMember
-
Field Details
-
NONE
-
position
-
type
-
thrownType
-
-
Constructor Details
-
Method Details
-
transform
-
accept
-
accept
-
transform
-
transform
-
normalize
-
getAssignHints
- Specified by:
getAssignHintsin interfaceIPartialExpression
-
eval
- Specified by:
evalin interfaceIPartialExpression
-
aborts
public boolean aborts()Determines if this expression aborts execution; that is, it is either a throw or a panic expression.- Returns:
- abort flag
-
getPossibleFunctionHeaders
public List<FunctionHeader> getPossibleFunctionHeaders(TypeScope scope, List<TypeID> hints, int arguments) - Specified by:
getPossibleFunctionHeadersin interfaceIPartialExpression
-
getTypeArguments
- Specified by:
getTypeArgumentsin interfaceIPartialExpression
-
forEachStatement
-
evaluateStringConstant
-
evaluateEnumConstant