ConstantDesc
, TypeDescriptor
, TypeDescriptor.OfField<ClassDesc>
Returns a
ClassDescfor an array type whose component type is described by this
ClassDesc.
Returns a
ClassDescfor an array type of the specified rank, whose component type is described by this
ClassDesc.
Returns the component type of this
ClassDesc, if it describes an array type, or
null
otherwise.
Returns a field type descriptor string for this type
Returns a human-readable name for the type described by this descriptor.
boolean
Compare the specified object with this descriptor for equality.
default boolean
Returns whether this
ClassDescdescribes an array type.
default boolean
Returns whether this
ClassDescdescribes a class or interface type.
default boolean
Returns whether this
ClassDescdescribes a primitive type.
Returns a
ClassDescfor a nested class of the class or interface type described by this
ClassDesc.
Returns a
ClassDescfor a nested class of the class or interface type described by this
ClassDesc.
Returns a
ClassDescfor a class or interface type, given the name of the class or interface, such as
"java.lang.String"
.
Returns a
ClassDescfor a class or interface type, given a package name and the unqualified (simple) name for the class or interface.
Returns a
ClassDescgiven a descriptor string for a class, interface, array, or primitive type.
Returns the package name of this
ClassDesc, if it describes a class or interface type.
name
- the fully qualified (dot-separated) binary class name
NullPointerException
- if the argument is null
IllegalArgumentException
- if the name string is not in the correct format
Returns a
ClassDescfor a class or interface type, given a package name and the unqualified (simple) name for the class or interface.
packageName
- the package name (dot-separated); if the package name is the empty string, the class is considered to be in the unnamed package
className
- the unqualified (simple) class name
NullPointerException
- if any argument is null
IllegalArgumentException
- if the package name or class name are not in the correct format
Returns a
ClassDescgiven a descriptor string for a class, interface, array, or primitive type.
"J", "I", "C", "S", "B", "D", "F", "Z", "V"
), or the letter "L"
, followed by the fully qualified binary name of a class, followed by ";"
. A field type descriptor for an array type is the character "["
followed by the field descriptor for the component type. Examples of valid type descriptor strings include "Ljava/lang/String;"
, "I"
, "[I"
, "V"
, "[Ljava/lang/String;"
, etc. See JVMS 4.3.2 ("Field Descriptors") for more detail.
descriptor
- a field descriptor string
NullPointerException
- if the argument is null
IllegalArgumentException
- if the name string is not in the correct format
Returns a
ClassDescfor an array type whose component type is described by this
ClassDesc.
arrayType
in interface TypeDescriptor.OfField<ClassDesc>
IllegalStateException
- if the resulting ClassDesc would have an array rank of greater than 255
Returns a
ClassDescfor an array type of the specified rank, whose component type is described by this
ClassDesc.
rank
- the rank of the array
IllegalArgumentException
- if the rank is less than or equal to zero or if the rank of the resulting array type is greater than 255
Returns a
ClassDescfor a nested class of the class or interface type described by this
ClassDesc.
d
describes the class java.util.Map
, a descriptor for the class java.util.Map.Entry
could be obtained by d.nested("Entry")
.
nestedName
- the unqualified name of the nested class
NullPointerException
- if the argument is null
IllegalStateException
- if this ClassDesc does not describe a class or interface type
IllegalArgumentException
- if the nested class name is invalid
Returns a
ClassDescfor a nested class of the class or interface type described by this
ClassDesc.
firstNestedName
- the unqualified name of the first level of nested class
moreNestedNames
- the unqualified name(s) of the remaining levels of nested class
NullPointerException
- if any argument or its contents is null
IllegalStateException
- if this ClassDesc does not describe a class or interface type
IllegalArgumentException
- if the nested class name is invalid
default boolean isArray()
Returns whether this
ClassDescdescribes an array type.
isArray
in interface TypeDescriptor.OfField<ClassDesc>
default boolean isPrimitive()
Returns whether this
ClassDescdescribes a primitive type.
isPrimitive
in interface TypeDescriptor.OfField<ClassDesc>
default boolean isClassOrInterface()
Returns whether this
ClassDescdescribes a class or interface type.
Returns the component type of this
ClassDesc, if it describes an array type, or
null
otherwise.
componentType
in interface TypeDescriptor.OfField<ClassDesc>
null
if this descriptor does not describe an array type
Returns the package name of this
ClassDesc, if it describes a class or interface type.
Returns a human-readable name for the type described by this descriptor.
The default implementation returns the simple name (e.g., int
) for primitive types, the unqualified class name for class or interface types, or the display name of the component type suffixed with the appropriate number of []
pairs for array types.
Returns a field type descriptor string for this type
descriptorString
in interface TypeDescriptor
Compare the specified object with this descriptor for equality. Returns
true
if and only if the specified object is also a
ClassDescand both describe the same type.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4