Package team.unnamed.mocha.parser.ast
Class AccessExpression
java.lang.Object
team.unnamed.mocha.parser.ast.AccessExpression
- All Implemented Interfaces:
Expression
Property accessing expression implementation,
access to a property on another expression result.
Example property accessing expressions: v.x,
v.location.x, 'str'.length, query.print
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()@NotNull Expressionobject()Gets the "object" expression, the property is evaluated on this expression's result.voidobject(@NotNull Expression object) Sets the "object" expression, the property is evaluated on this expression's result.@NotNull Stringproperty()Gets the accessed property name.toString()<R> Rvisit(@NotNull ExpressionVisitor<R> visitor) Visits this expression with the given visitor.
-
Constructor Details
-
AccessExpression
-
-
Method Details
-
object
Gets the "object" expression, the property is evaluated on this expression's result.- Returns:
- The object expression.
- Since:
- 3.0.0
-
object
Sets the "object" expression, the property is evaluated on this expression's result.- Parameters:
object- The object expression.- Since:
- 3.0.0
-
property
Gets the accessed property name.- Returns:
- The property name.
- Since:
- 3.0.0
-
visit
Description copied from interface:ExpressionVisits this expression with the given visitor.- Specified by:
visitin interfaceExpression- Type Parameters:
R- The visit result return type- Parameters:
visitor- The expression visitor- Returns:
- The visit result
-
toString
-
equals
-
hashCode
public int hashCode()
-