Class GenericMetadataSupport.WildCardBoundedType
- java.lang.Object
-
- org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType
-
- All Implemented Interfaces:
java.lang.reflect.Type
,GenericMetadataSupport.BoundedType
- Enclosing class:
- GenericMetadataSupport
public static class GenericMetadataSupport.WildCardBoundedType extends java.lang.Object implements GenericMetadataSupport.BoundedType
Type representing bounds of a wildcard, allows to keep all bounds information.The JLS says that lower bound and upper bound are mutually exclusive, and that multiple bounds are not allowed.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.WildcardType
wildcard
-
Constructor Summary
Constructors Constructor Description WildCardBoundedType(java.lang.reflect.WildcardType wildcard)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.reflect.Type
firstBound()
int
hashCode()
java.lang.reflect.Type[]
interfaceBounds()
java.lang.String
toString()
java.lang.reflect.WildcardType
wildCard()
-
-
-
Method Detail
-
firstBound
public java.lang.reflect.Type firstBound()
- Specified by:
firstBound
in interfaceGenericMetadataSupport.BoundedType
- Returns:
- The first bound, either a type or a reference to a TypeVariable
-
interfaceBounds
public java.lang.reflect.Type[] interfaceBounds()
- Specified by:
interfaceBounds
in interfaceGenericMetadataSupport.BoundedType
- Returns:
- An empty array as, wildcard don't support multiple bounds.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
wildCard
public java.lang.reflect.WildcardType wildCard()
-
-