Schnittstelle Value
- Alle bekannten Unterschnittstellen:
IndexValue
- Alle bekannten Implementierungsklassen:
ArrayValue,IndexValueWrapper,UnknownValue,VariableValue
public interface Value
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault booleanReturns true if the value is a literal, which is known.Optional<spoon.reflect.code.CtExpression<?>>Returns the value as a CtExpression if possible.default Optional<spoon.reflect.code.CtLiteral<?>>Returns the value as a CtLiteral if possible.
-
Methodendetails
-
isConstant
default boolean isConstant()Returns true if the value is a literal, which is known.- Gibt zurück:
- true if it is constant and false if not
-
toLiteral
Returns the value as a CtLiteral if possible.- Gibt zurück:
- the value as a literal or none if it is not known or not a literal
-
toExpression
Optional<spoon.reflect.code.CtExpression<?>> toExpression()Returns the value as a CtExpression if possible.- Gibt zurück:
- the value as a CtExpression or none if it is not convertible
-