Class TypeTag
- java.lang.Object
-
- nl.jqno.equalsverifier.internal.prefabvalues.TypeTag
-
public final class TypeTag extends Object
Represents a generic type, including raw type and generic type parameters.If the type is not generic, the genericTypes list will be empty.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
List<TypeTag>
getGenericTypes()
<T> Class<T>
getType()
int
hashCode()
static TypeTag
of(Field field, TypeTag enclosingType)
Resolves a TypeTag from the type of aField
instance, using an enclosing type to determine any generic parameters the field may contain.String
toString()
-
-
-
Field Detail
-
NULL
public static final TypeTag NULL
Null object for TypeTag.
-
-
Method Detail
-
of
public static TypeTag of(Field field, TypeTag enclosingType)
Resolves a TypeTag from the type of aField
instance, using an enclosing type to determine any generic parameters the field may contain.- Parameters:
field
- The field to resolve.enclosingType
- The type that contains the field, used to determine any generic parameters it may contain.- Returns:
- The TypeTag for the given field.
-
getType
public <T> Class<T> getType()
- Type Parameters:
T
- The returnedClass
will have this generic type.- Returns:
- The TypeTag's raw type.
-
-