Record Class ClassTypeDef.JavaClass
- Record Components:
type- The typenullable- Is nullable
- All Implemented Interfaces:
ClassTypeDef, TypeDef
- Enclosing interface:
ClassTypeDef
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClassTypeDef
ClassTypeDef.AnnotatedClassTypeDef, ClassTypeDef.ClassDefType, ClassTypeDef.ClassElementType, ClassTypeDef.ClassName, ClassTypeDef.JavaClass, ClassTypeDef.ParameterizedNested classes/interfaces inherited from interface TypeDef
TypeDef.Annotated, TypeDef.AnnotatedTypeDef, TypeDef.Array, TypeDef.Primitive, TypeDef.TypeVariable, TypeDef.Wildcard -
Field Summary
Fields inherited from interface ClassTypeDef
OBJECT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.findDeclaredMethods(String name, int argumentCount) Find the methods this type declares that a call with the given name and number of arguments could target, variable arity included.Find the method that can be represented as a lambda.getName()The names of the type variables this type declares, in declaration order.inthashCode()Returns a hash code value for this object.booleanisEnum()booleanisInner()booleanbooleanbooleannullable()Returns the value of thenullablerecord component.final StringtoString()Returns a string representation of this record class.Class<?> type()Returns the value of thetyperecord component.Methods inherited from interface ClassTypeDef
annotated, annotated, constructorReference, constructorReference, getLambda, getLambda, getPackageName, getStaticField, getStaticField, getStaticField, instantiate, instantiate, instantiate, instantiate, instantiate, instantiate, instantiate, invokeStatic, invokeStatic, invokeStatic, invokeStatic, invokeStatic, invokeStatic, invokeStatic, invokeStatic, invokeStatic, invokeStatic, methodReference, methodReference, methodReference, resolveTypeVariables, staticMethodReference, staticMethodReferenceMethods inherited from interface TypeDef
array, array, isArray, isPrimitive, resolveTypeVariables
-
Constructor Details
-
JavaClass
-
-
Method Details
-
getLambda
Description copied from interface:ClassTypeDefFind the method that can be represented as a lambda.- Specified by:
getLambdain interfaceClassTypeDef- Parameters:
resolveVariableFn- The resolved variable function- Returns:
- The lambda method
-
getTypeVariableNames
Description copied from interface:ClassTypeDefThe names of the type variables this type declares, in declaration order.Used to line up the arguments of a
ClassTypeDef.Parameterizedtype with the variables the raw type declares. Only implementations that carry member information return anything.- Specified by:
getTypeVariableNamesin interfaceClassTypeDef- Returns:
- The type variable names, or an empty list when they cannot be resolved
-
findDeclaredMethods
Description copied from interface:ClassTypeDefFind the methods this type declares that a call with the given name and number of arguments could target, variable arity included.Used by the convenience overloads that would otherwise build the invoked signature from the static types of the arguments, which names a method that does not exist whenever an argument is statically narrower than the declared parameter.
Bridge methods are included, because their descriptors are real: a covariant override such as
ReentrantReadWriteLock.readLock()leaves a bridge returning the supertype, and a call declaring that return type does resolve.Only implementations that carry member information return anything -
ClassTypeDef.of(Class),ClassTypeDef.of(ClassElement)and a definition being generated.ClassTypeDef.of(String)has nothing to resolve against and returns an empty list, which leaves the signature inferred as before.- Specified by:
findDeclaredMethodsin interfaceClassTypeDef- Parameters:
name- The method name, orMethodDef.CONSTRUCTORargumentCount- The number of arguments at the call site- Returns:
- The candidate methods, or an empty list when they cannot be resolved
-
getName
- Specified by:
getNamein interfaceClassTypeDef- Returns:
- The type name
-
getSimpleName
- Specified by:
getSimpleNamein interfaceClassTypeDef- Returns:
- The simple name
-
getCanonicalName
- Specified by:
getCanonicalNamein interfaceClassTypeDef- Returns:
- The canonical type name
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceTypeDef- Returns:
- Is nullable type
-
makeNullable
- Specified by:
makeNullablein interfaceClassTypeDef- Specified by:
makeNullablein interfaceTypeDef- Returns:
- A new nullable type
-
isEnum
public boolean isEnum()- Specified by:
isEnumin interfaceClassTypeDef- Returns:
- True if the class is an enum
-
isInterface
public boolean isInterface()- Specified by:
isInterfacein interfaceClassTypeDef- Returns:
- True if interface
-
isInner
public boolean isInner()- Specified by:
isInnerin interfaceClassTypeDef- Returns:
- True if inner
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
toString
-
type
-
nullable
-