类 DefaultJavaParameter

所有已实现的接口:
JavaAnnotatedElement, JavaModel, JavaParameter, JavaType, Serializable

public class DefaultJavaParameter extends AbstractBaseJavaEntity implements JavaParameter
另请参阅:
  • 构造器详细资料

    • DefaultJavaParameter

      public DefaultJavaParameter(JavaClass type, String name)
    • DefaultJavaParameter

      public DefaultJavaParameter(JavaClass type, String name, boolean varArgs)
  • 方法详细资料

    • getCodeBlock

      public String getCodeBlock()
      指定者:
      getCodeBlock 在接口中 JavaModel
      返回:
      the codeblock
    • setName

      public void setName(String name)
    • getName

      public String getName()
      指定者:
      getName 在接口中 JavaParameter
      返回:
      the name of the parameter
    • getType

      public JavaType getType()
      指定者:
      getType 在接口中 JavaParameter
      返回:
      the type of this parameter
    • getJavaClass

      public JavaClass getJavaClass()
      指定者:
      getJavaClass 在接口中 JavaParameter
    • getExecutable

      public JavaExecutable getExecutable()
      Returns the declaring method or constructor of this parameter
      指定者:
      getExecutable 在接口中 JavaParameter
      返回:
      the declaring method or constructor
    • setExecutable

      public void setExecutable(JavaExecutable executable)
    • getDeclaringClass

      public JavaClass getDeclaringClass()
      Not every entity has a parentClass, but AnnotationFieldRef requires access to it. When used with JavaClass, don't confuse this with getSuperClass()
      指定者:
      getDeclaringClass 在接口中 JavaParameter
      覆盖:
      getDeclaringClass 在类中 AbstractBaseJavaEntity
      返回:
      the surrounding class
    • isVarArgs

      public boolean isVarArgs()
      Is this a Java 5 var args type specified using three dots. e.g. void doStuff(Object... thing)
      指定者:
      isVarArgs 在接口中 JavaParameter
      返回:
      true if this parameter is a varArg, otherwise false
    • getBinaryName

      public String getBinaryName()
      The class or interface must be named by its binary name, which must meet the following constraints:
      • The binary name of a top level type is its canonical name.
      • The binary name of a member type consists of the binary name of its immediately enclosing type, followed by $, followed by the simple name of the member.
      指定者:
      getBinaryName 在接口中 JavaType
      返回:
      the binary name
      另请参阅:
    • getFullyQualifiedName

      public String getFullyQualifiedName()
      Every primitive type, named package, top level class, and top level interface has a fully qualified name:
      • The fully qualified name of a primitive type is the keyword for that primitive type, namely byte, short, char, int, long, float, double, or boolean.
      • The fully qualified name of a named package that is not a subpackage of a named package is its simple name.
      • The fully qualified name of a named package that is a subpackage of another named package consists of the fully qualified name of the containing package, followed by ".", followed by the simple (member) name of the subpackage.
      • The fully qualified name of a top level class or top level interface that is declared in an unnamed package is the simple name of the class or interface.
      • The fully qualified name of a top level class or top level interface that is declared in a named package consists of the fully qualified name of the package, followed by ".", followed by the simple name of the class or interface.
      Each member class, member interface, and array type may have a fully qualified name:
      • A member class or member interface M of another class or interface C has a fully qualified name if and only if C has a fully qualified name.
      • In that case, the fully qualified name of M consists of the fully qualified name of C, followed by ".", followed by the simple name of M.
      • An array type has a fully qualified name if and only if its element type has a fully qualified name.
      • In that case, the fully qualified name of an array type consists of the fully qualified name of the component type of the array type followed by "[]".
      Some examples how names will be translated
       Object > java.lang.Object
       java.util.List > java.util.List
       ?  > ?
       T  > T
       anypackage.Outer.Inner > anypackage.Outer.Inner
       String[][] > java.lang.String[][]
       
      指定者:
      getFullyQualifiedName 在接口中 JavaParameter
      指定者:
      getFullyQualifiedName 在接口中 JavaType
      返回:
      the FQN of the type, never null
      另请参阅:
    • getCanonicalName

      public String getCanonicalName()
      Equivalent of (@link Class.getCanonicalName().
      指定者:
      getCanonicalName 在接口中 JavaParameter
      指定者:
      getCanonicalName 在接口中 JavaType
      返回:
      the canonical name of the type, never null
    • getValue

      public String getValue()
      If there's a reference to this class, use the value used in the code. Otherwise return the simple name. When including all imports, you should be safe to use this method. This won't return generics, so it's java1.4 safe. Examples:
        private String fieldA;             // getValue() will return "String"
        private java.lang.String fieldA;   // getValue() will return "java.lang.String"
        private List>String> aList;  // getValue() will return "List"
       
      指定者:
      getValue 在接口中 JavaParameter
      指定者:
      getValue 在接口中 JavaType
      返回:
      the value of the type, never null
    • getGenericCanonicalName

      public String getGenericCanonicalName()
      The canonical name with generic information.
      指定者:
      getGenericCanonicalName 在接口中 JavaType
      返回:
      the generic canonical name
    • getGenericFullyQualifiedName

      public String getGenericFullyQualifiedName()
      The fully qualified name with generic information.
      指定者:
      getGenericFullyQualifiedName 在接口中 JavaType
      返回:
      the generic fully qualified name
    • getResolvedValue

      public String getResolvedValue()
      指定者:
      getResolvedValue 在接口中 JavaParameter
      返回:
      the resolved value of the type
    • getResolvedFullyQualifiedName

      public String getResolvedFullyQualifiedName()
      指定者:
      getResolvedFullyQualifiedName 在接口中 JavaParameter
      返回:
      the resolved FQN, never null
    • getResolvedGenericValue

      public String getResolvedGenericValue()
      指定者:
      getResolvedGenericValue 在接口中 JavaParameter
      返回:
      the resolved generic value of the type, never null
    • getResolvedGenericFullyQualifiedName

      public String getResolvedGenericFullyQualifiedName()
      指定者:
      getResolvedGenericFullyQualifiedName 在接口中 JavaParameter
      返回:
      the resolved generic FQN, never null
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • getGenericValue

      public String getGenericValue()
      A java5+ representation of the class. When including all imports, you should be safe to use this method. Examples:
        private String fieldA;             // getValue() will return "String"
        private java.lang.String fieldA;   // getValue() will return "java.lang.String"
        private List>String> aList;  // getValue() will return "List>String>"
       
      指定者:
      getGenericValue 在接口中 JavaType
      返回:
      the generic name of the class as used in the source
    • toGenericString

      public String toGenericString()
      指定者:
      toGenericString 在接口中 JavaType