接口 JavaExecutable

所有超级接口:
JavaAnnotatedElement, JavaGenericDeclaration, JavaMember, JavaModel, Serializable
所有已知子接口:
JavaConstructor, JavaMethod
所有已知实现类:
DefaultJavaConstructor, DefaultJavaExecutable, DefaultJavaMethod, JavaMethodDelegate

public interface JavaExecutable extends JavaAnnotatedElement, JavaGenericDeclaration, JavaMember
A shared interface for the common functionality of Method and Constructor.
从以下版本开始:
2.0
作者:
Robert Scholte
另请参阅:
  • 方法详细资料

    • getDeclaringClass

      JavaClass getDeclaringClass()
      从接口复制的说明: JavaMember
      指定者:
      getDeclaringClass 在接口中 JavaMember
      返回:
      the declaring class
    • getExceptions

      List<JavaClass> getExceptions()
      返回:
      a list of Exceptions, never null
    • getExceptionTypes

      List<JavaType> getExceptionTypes()
    • getParameterByName

      JavaParameter getParameterByName(String name)
      参数:
      name - the name of the parameter
      返回:
      the JavaParameter matching the name, otherwise null
    • getParameters

      List<JavaParameter> getParameters()
      Equivalent of Executable.getParameterTypes(), where a JavaParameter also contains the original name if available.
      返回:
      a list of JavaParameters, never null
    • getParameterTypes

      List<JavaType> getParameterTypes()
      返回:
      a list of JavaParameters, never null
      从以下版本开始:
      1.12
    • getParameterTypes

      List<JavaType> getParameterTypes(boolean resolve)
      If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types
      参数:
      resolve - true if the resolved types should be returned, otherwise false
      返回:
      the parameter types
      从以下版本开始:
      1.12
    • getSourceCode

      String getSourceCode()
      Get the original source code of the body of this method.
      返回:
      Code as string.
    • isVarArgs

      boolean isVarArgs()
      返回:
      true if the final parameter is a varArg, otherwise false
    • getCallSignature

      String getCallSignature()