Klasse MemberValuePair

java.lang.Object
org.aspectj.org.eclipse.jdt.core.dom.ASTNode
org.aspectj.org.eclipse.jdt.core.dom.MemberValuePair

public class MemberValuePair extends ASTNode
Member value pair node (added in JLS3 API). Member value pairs appear in annotations.
 MemberValuePair:
   SimpleName = Expression
 

Within annotations, only certain kinds of expressions are meaningful, including other annotations.

Seit:
3.1
Siehe auch:
  • Felddetails

  • Methodendetails

    • propertyDescriptors

      public static List propertyDescriptors(int apiLevel)
      Returns a list of structural property descriptors for this node type. Clients must not modify the result.
      Parameter:
      apiLevel - the API level; one of the AST.JLS* constants
      Gibt zurück:
      a list of property descriptors (element type: StructuralPropertyDescriptor)
    • getName

      public SimpleName getName()
      Returns the member name.
      Gibt zurück:
      the member name node
    • resolveMemberValuePairBinding

      public final IMemberValuePairBinding resolveMemberValuePairBinding()
      Resolves and returns the member value pair binding for this member value pair.

      Note that bindings are generally unavailable unless requested when the AST is being built.

      Gibt zurück:
      the binding, or null if the binding cannot be resolved
      Seit:
      3.2
    • setName

      public void setName(SimpleName name)
      Sets the member name.
      Parameter:
      name - the member name node
      Löst aus:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent
    • getValue

      public Expression getValue()
      Returns the value expression.
      Gibt zurück:
      the value expression
    • setValue

      public void setValue(Expression value)
      Sets the value of this pair.
      Parameter:
      value - the new value
      Löst aus:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent
      • a cycle in would be created