接口 JavaMethod

所有超级接口:
JavaAnnotatedElement, JavaExecutable, JavaGenericDeclaration, JavaMember, JavaModel, Serializable
所有已知实现类:
DefaultJavaMethod, JavaMethodDelegate

  • 方法详细资料

    • getReturns

      JavaClass getReturns()
      返回:
      the return type
    • getDeclarationSignature

      String getDeclarationSignature(boolean withModifiers)
      参数:
      withModifiers - true if modifiers should be added, otherwise false
      返回:
      the declaration signature
      从以下版本开始:
      1.3
    • getCallSignature

      String getCallSignature()
      指定者:
      getCallSignature 在接口中 JavaExecutable
      返回:
      the call signature
      从以下版本开始:
      1.3
    • signatureMatches

      boolean signatureMatches(String name, List<JavaType> parameterTypes)
      This method is NOT varArg aware.
      参数:
      name - the name of the method
      parameterTypes - the parameter types of the method, can be null
      返回:
      true if this method matches the signature, otherwise false
    • signatureMatches

      boolean signatureMatches(String name, List<JavaType> parameterTypes, boolean varArg)
      参数:
      name - the name of the method
      parameterTypes - the parameter types, can be null
      varArg - true is signature should match a varArg-method, otherwise false
      返回:
      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
       
      返回:
      true if this method is a Java Bean accessor, otherwise false
      从以下版本开始:
      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
       
      返回:
      true if this method is a Java Bean mutator, otherwise false
      从以下版本开始:
      1.3
    • getPropertyType

      JavaType getPropertyType()
      返回:
      the type of the property this method represents, or null if this method is not a property mutator or property accessor.
      从以下版本开始:
      1.3
    • getPropertyName

      String getPropertyName()
      返回:
      the name of the property this method represents, or null if this method is not a property mutator or property accessor.
      从以下版本开始:
      1.3
    • getTagsByName

      List<DocletTag> getTagsByName(String name, boolean inherited)
    • getReturnType

      JavaType getReturnType()
      Equivalent of java.lang.reflect.Method.getReturnType()
      返回:
      the return type
      从以下版本开始:
      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
      参数:
      resolve - define if generic should be resolved
      返回:
      the return type
      从以下版本开始:
      1.12
    • getTagByName

      DocletTag getTagByName(String string, boolean b)
    • isDefault

      boolean isDefault()
      返回:
      true if this is a default method of an interface, otherwise false
      从以下版本开始:
      2.0