|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.util.BoundType
public class BoundType
Represents an rectified, generic type, which is only equal to another BoundType
iff all bounds are exactly the same.
Constructor Summary | |
---|---|
BoundType(Class<?> type)
Initializes a BoundType around the given raw type. |
|
BoundType(ParameterizedType type)
Initializes a BoundType around the given parameterized type. |
Method Summary | |
---|---|
static BoundType[] |
arrayOf(Class<?>... rawTypes)
Wraps an array of Class to an array of BoundType s without parameters. |
boolean |
equals(Object obj)
|
ParameterizedType |
getParameterizedType()
Returns the wrapped parameterized type or null if this BoundType was not created around a ParameterizedType . |
BoundType[] |
getParameters()
Returns the bound types or an empty array if none exists. |
Class<?> |
getType()
Returns the raw type. |
int |
hashCode()
|
static BoundType |
of(Class<?> rawType,
BoundType... parameters)
Creates a BoundType around the given raw type with additional type parameters. |
static BoundType |
of(Class<?> rawType,
Class<?> subType1,
Class<?>... otherTypes)
Creates a BoundType around the given raw type with additional type parameters. |
static BoundType |
of(ParameterizedType type)
Creates a BoundType for the given ParameterizedType . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BoundType(Class<?> type)
BoundType
around the given raw type.
type
- the type to wrappublic BoundType(ParameterizedType type)
BoundType
around the given parameterized type. Recursively determines the static bounds of all superclasses.
type
- the type to wrapMethod Detail |
---|
public static BoundType[] arrayOf(Class<?>... rawTypes)
Class
to an array of BoundType
s without parameters.
rawTypes
- the classes to wrap
BoundType
for each raw typepublic static BoundType of(Class<?> rawType, BoundType... parameters)
BoundType
around the given raw type with additional type parameters.
rawType
- the class to wrapparameters
- the type parameters
BoundType
representing the raw type and its parameterspublic static BoundType of(Class<?> rawType, Class<?> subType1, Class<?>... otherTypes)
BoundType
around the given raw type with additional type parameters.
rawType
- the classes to wrapsubType1
- the first type parameterotherTypes
- additional type parameters
BoundType
representing the raw type and its parameterspublic static BoundType of(ParameterizedType type)
BoundType
for the given ParameterizedType
.
type
- the type to wrap
public boolean equals(Object obj)
equals
in class Object
public ParameterizedType getParameterizedType()
BoundType
was not created around a ParameterizedType
.
public BoundType[] getParameters()
public Class<?> getType()
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |