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.WildcardTypewildcard
-
Constructor Summary
Constructors Constructor Description WildCardBoundedType(java.lang.reflect.WildcardType wildcard)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.reflect.TypefirstBound()inthashCode()java.lang.reflect.Type[]interfaceBounds()java.lang.StringtoString()java.lang.reflect.WildcardTypewildCard()
-
-
-
Method Detail
-
firstBound
public java.lang.reflect.Type firstBound()
- Specified by:
firstBoundin interfaceGenericMetadataSupport.BoundedType- Returns:
- The first bound, either a type or a reference to a TypeVariable
-
interfaceBounds
public java.lang.reflect.Type[] interfaceBounds()
- Specified by:
interfaceBoundsin interfaceGenericMetadataSupport.BoundedType- Returns:
- An empty array as, wildcard don't support multiple bounds.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
wildCard
public java.lang.reflect.WildcardType wildCard()
-
-