Package net.karneim.pojobuilder.model
Class TypeVariableM
- java.lang.Object
-
- net.karneim.pojobuilder.model.TypeM
-
- net.karneim.pojobuilder.model.TypeVariableM
-
- Direct Known Subclasses:
TypeWildcardM
public class TypeVariableM extends TypeM
-
-
Constructor Summary
Constructors Constructor Description TypeVariableM(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportTypesMaddToImportTypes(ImportTypesM result)booleanequals(java.lang.Object obj)protected java.lang.StringgetBoundRelation()java.lang.StringgetBoundsString()java.lang.StringgetGenericTypeDefinition()Returns a String representation of the complete generics definition of this type.booleanhasBounds()inthashCode()ThisTypeM.hashCode()implementation doesn't use typeParameters to avoid a potential StackOverflowError.booleanisTypeVariable()java.lang.StringtoString()TypeVariableMwhichExtends(TypeM... types)-
Methods inherited from class net.karneim.pojobuilder.model.TypeM
getGenericType, getName, getPackageName, getSimpleName, getSimpleNames, getTypeParameters, isArrayType, isGeneric, isInPackage, isPrimitive, withTypeParameter
-
-
-
-
Field Detail
-
bounds
protected final TypeListM bounds
-
-
Method Detail
-
isTypeVariable
public boolean isTypeVariable()
- Overrides:
isTypeVariablein classTypeM
-
whichExtends
public TypeVariableM whichExtends(TypeM... types)
-
hasBounds
public boolean hasBounds()
-
getBoundsString
public java.lang.String getBoundsString()
-
getGenericTypeDefinition
public java.lang.String getGenericTypeDefinition()
Description copied from class:TypeMReturns a String representation of the complete generics definition of this type. This can be used for generic parameter definitions of classes and methods.Named generic types are represented with bounds. To get a minimal representation used for field declarations see
TypeM.getGenericType()Example Output:
"Map<T extends CharSequence, E extends List<? super Number>>"- Overrides:
getGenericTypeDefinitionin classTypeM- Returns:
- the complete generics definition
-
getBoundRelation
protected java.lang.String getBoundRelation()
-
addToImportTypes
public ImportTypesM addToImportTypes(ImportTypesM result)
- Overrides:
addToImportTypesin classTypeM
-
hashCode
public int hashCode()
Description copied from class:TypeMThisTypeM.hashCode()implementation doesn't use typeParameters to avoid a potential StackOverflowError. TheTypeM.equals(Object)implementation does use that field.
-
-