Interface ASTMemberValue

All Superinterfaces:
GenericNode<JavaNode>, JavaNode, JjtreeNode<JavaNode>, Node, Reportable, TextAvailableNode
All Known Subinterfaces:
ASTAssignableExpr, ASTAssignableExpr.ASTNamedReferenceExpr, ASTExpression, ASTLiteral, ASTPrimaryExpression, FunctionalExpression, QualifiableExpression
All Known Implementing Classes:
ASTAmbiguousName, ASTAnnotation, ASTArrayAccess, ASTArrayAllocation, ASTArrayInitializer, ASTAssignmentExpression, ASTBooleanLiteral, ASTCastExpression, ASTCharLiteral, ASTClassLiteral, ASTConditionalExpression, ASTConstructorCall, ASTFieldAccess, ASTInfixExpression, ASTLambdaExpression, ASTMemberValueArrayInitializer, ASTMethodCall, ASTMethodReference, ASTNullLiteral, ASTNumericLiteral, ASTPatternExpression, ASTStringLiteral, ASTSuperExpression, ASTSwitchExpression, ASTThisExpression, ASTTypeExpression, ASTUnaryExpression, ASTVariableAccess

public interface ASTMemberValue extends JavaNode
Represents the value of a member of an annotation. This can appear in a member-value pair, or in the default clause of an annotation method.

 MemberValue ::= Annotation
               | MemberValueArrayInitializer
               | < any constant expression >

 
  • Method Details

    • getConstValue

      default @Nullable Object getConstValue()
      Returns the constant value of this node, if this is a constant expression. Otherwise, or if some references couldn't be resolved, returns null. Note that null is not a constant value, so this method's returning null is not a problem. Note that annotations are not given a constant value by this implementation.