Class ASTConstructorDeclaration

    • Method Detail

      • getKind

        public MethodLikeNode.MethodLikeKind getKind()
        Description copied from interface: MethodLikeNode
        Returns a token indicating whether this node is a lambda expression or a method or constructor declaration. Can be used to downcast safely to a subinterface or an implementing class.
        Returns:
        The kind of method-like
      • containsComment

        public boolean containsComment()
      • getParameterCount

        @Deprecated
        @DeprecatedAttribute(replaceWith="@Arity")
        public int getParameterCount()
        Deprecated.
      • getArity

        public int getArity()
        Returns the number of formal parameters expected by this constructor (excluding any receiver parameter). A varargs parameter counts as one.
      • getAnnotation

        public ASTAnnotation getAnnotation​(String binaryName)
        Description copied from interface: Annotatable
        Returns a specific annotation on this node, or null if absent.
        Specified by:
        getAnnotation in interface Annotatable
        Parameters:
        binaryName - Binary name of the annotation type. Note: for now, canonical names are tolerated, this may be changed in PMD 7.
      • isAnnotationPresent

        public boolean isAnnotationPresent​(String binaryName)
        Description copied from interface: Annotatable
        Checks whether the annotation is present on this node.
        Specified by:
        isAnnotationPresent in interface Annotatable
        Parameters:
        binaryName - Binary name of the annotation type. Note: for now, canonical names are tolerated, this may be changed in PMD 7.
        Returns:
        true if the annotation is present on this node, else false
      • isAnyAnnotationPresent

        public boolean isAnyAnnotationPresent​(Collection<String> binaryNames)
        Description copied from interface: Annotatable
        Checks whether any annotation is present on this node.
        Specified by:
        isAnyAnnotationPresent in interface Annotatable
        Parameters:
        binaryNames - Collection that contains binary names of annotations. Note: for now, canonical names are tolerated, this may be changed in PMD 7.
        Returns:
        true if any annotation is present on this node, else false