Class TypeMetadata
java.lang.Object
de.floydkretschmar.fixturize.domain.TypeMetadata
Contains all names related to a specific type.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()createVariableElementMetadata(List<? extends VariableElement> elements) Creates metadata for the specified variable elements using this type metadata.booleanOnly the generic part of the class definition.Map<? extends TypeMirror, ? extends DeclaredType> The map that contains the relation between generic types and their concrete implementation for the type.The name of the package of the type.The fully qualified name of the type.The fully qualified name of the type but with the generics erased.The fully qualified name of the corresponding fixture class for the type.The simple class name of the typeThe simple class name of the type but with the generics erased.inthashCode()booleanReturns a boolean indicating if a package name exists, or if it is part of the base package.booleanReturns a boolean indicating if if the underlying type is a generic or not.toString()
-
Method Details
-
hasPackageName
public boolean hasPackageName()Returns a boolean indicating if a package name exists, or if it is part of the base package.- Returns:
- true if the package name exists, false if it is an empty string
-
isGeneric
public boolean isGeneric()Returns a boolean indicating if if the underlying type is a generic or not.- Returns:
- true if the underlying type is a generic, false otherwise
-
createVariableElementMetadata
public List<VariableElementMetadata> createVariableElementMetadata(List<? extends VariableElement> elements) Creates metadata for the specified variable elements using this type metadata.- Parameters:
elements- - for which metadata will be created- Returns:
- the variable elements metadata
-
builder
-
getQualifiedClassName
The fully qualified name of the type. -
getQualifiedClassNameWithoutGeneric
The fully qualified name of the type but with the generics erased. -
getSimpleClassName
The simple class name of the type -
getSimpleClassNameWithoutGeneric
The simple class name of the type but with the generics erased. -
getPackageName
The name of the package of the type. Empty if the class is located in the base package. -
getQualifiedFixtureClassName
The fully qualified name of the corresponding fixture class for the type. -
getGenericPart
Only the generic part of the class definition. Empty if the type is not a generic. -
getGenericTypeMap
The map that contains the relation between generic types and their concrete implementation for the type. Empty if the type is not a generic. -
equals
-
hashCode
public int hashCode() -
toString
-