Interface JavaMethod

    • Method Detail

      • getReturns

        JavaClass getReturns()
        Returns:
        the return type
      • getDeclarationSignature

        java.lang.String getDeclarationSignature​(boolean withModifiers)
        Parameters:
        withModifiers - true if modifiers should be added, otherwise false
        Returns:
        the declaration signature
        Since:
        1.3
      • getCallSignature

        java.lang.String getCallSignature()
        Specified by:
        getCallSignature in interface JavaExecutable
        Returns:
        the call signature
        Since:
        1.3
      • signatureMatches

        boolean signatureMatches​(java.lang.String name,
                                 java.util.List<JavaType> parameterTypes)
        This method is NOT varArg aware.
        Parameters:
        name - the name of the method
        parameterTypes - the parameter types of the method, can be null
        Returns:
        true if this method matches the signature, otherwise false
      • signatureMatches

        boolean signatureMatches​(java.lang.String name,
                                 java.util.List<JavaType> parameterTypes,
                                 boolean varArg)
        Parameters:
        name - the name of the method
        parameterTypes - the parameter types, can be null
        varArg - true is signature should match a varArg-method, otherwise false
        Returns:
        true if this method matches the signature, otherwise false
      • isPropertyAccessor

        boolean isPropertyAccessor()
        Returns true if this method follows the bean convention of being an accessor.
           public String getName();             // true
           public boolean isValid()             // true
           public String getName( String def ); // false, it has a parameter
           public String gettingUp();           // false, 'get' is not followed by an uppercase character
           public boolean isolate();            // false, 'is' is not followed by an uppercase character
           public static String getName();      // false, it is static
         
        Returns:
        true if this method is a Java Bean accessor, otherwise false
        Since:
        1.3
      • isPropertyMutator

        boolean isPropertyMutator()
        Returns true if this method follows the bean convention of being an mutator.
          public void setName(String name);        // true
          public void setUp();                     // false, it has no parameter
          public void settingUp(String def);       // false, 'set' is not followed by an uppercase character
          public static void setName(String name); // false, it is static
         
        Returns:
        true if this method is a Java Bean mutator, otherwise false
        Since:
        1.3
      • getPropertyType

        JavaType getPropertyType()
        Returns:
        the type of the property this method represents, or null if this method is not a property mutator or property accessor.
        Since:
        1.3
      • getPropertyName

        java.lang.String getPropertyName()
        Returns:
        the name of the property this method represents, or null if this method is not a property mutator or property accessor.
        Since:
        1.3
      • getTagsByName

        java.util.List<DocletTag> getTagsByName​(java.lang.String name,
                                                boolean inherited)
      • getReturnType

        JavaType getReturnType()
        Equivalent of java.lang.reflect.Method.getReturnType()
        Returns:
        the return type
        Since:
        1.12
      • getReturnType

        JavaType getReturnType​(boolean resolve)
        If a class inherits this method from a generic class or interface, you can use this method to get the resolved return type
        Parameters:
        resolve - define if generic should be resolved
        Returns:
        the return type
        Since:
        1.12
      • getTagByName

        DocletTag getTagByName​(java.lang.String string,
                               boolean b)
      • isDefault

        boolean isDefault()
        Equivalent Method.isDefault()
        Returns:
        true if this is a default method of an interface, otherwise false
        Since:
        2.0