Class AnonymousClassDeclaration


  • public class AnonymousClassDeclaration
    extends ASTNode
    Anonymous class declaration AST node type. For JLS2, this type of node appears only as a child on a class instance creation expression. For JLS3, this type of node appears may also appear as the child of an enum constant declaration.
     AnonymousClassDeclaration:
            { ClassBodyDeclaration }
     
    Since:
    2.0
    See Also:
    ClassInstanceCreation, EnumConstantDeclaration
    Restriction:
    This class is not intended to be instantiated by clients.
    • Field Detail

    • Method Detail

      • propertyDescriptors

        public static List propertyDescriptors​(int apiLevel)
        Returns a list of structural property descriptors for this node type. Clients must not modify the result.
        Parameters:
        apiLevel - the API level; one of the AST.JLS* constants
        Returns:
        a list of property descriptors (element type: StructuralPropertyDescriptor)
        Since:
        3.0
      • bodyDeclarations

        public List bodyDeclarations()
        Returns the live ordered list of body declarations of this anonymous class declaration.
        Returns:
        the live list of body declarations (element type: BodyDeclaration)
      • resolveBinding

        public ITypeBinding resolveBinding()
        Resolves and returns the binding for the anonymous class declared in this declaration.

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

        Returns:
        the binding, or null if the binding cannot be resolved