java.lang.Object
org.elasticsearch.injection.guice.internal.MoreTypes
Static methods for working with types that we aren't publishing in the
public
Types API.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classThe WildcardType interface supports multiple upper bounds and multiple lower bounds. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Typecanonicalize(Type type) Returns a type that is functionally equal but not necessarily equal according toObject.equals().static booleanReturns true ifaandbare equal.static TypegetGenericSupertype(Type type, Class<?> rawType, Class<?> toResolve) Returns the generic supertype forsupertype.static Class<?> getRawType(Type type) static intReturns the hashCode oftype.static <T> TypeLiteral<T> makeKeySafe(TypeLiteral<T> type) Returns an equivalent type that's safe for use in a key.memberType(Member member) ReturnsField.class,Method.classorConstructor.class.static TyperesolveTypeVariable(Type type, Class<?> rawType, TypeVariable<?> unknown) static StringFormats a member as concise string, such asjava.util.ArrayList.size,java.util.ArrayList<init>()orjava.util.List.remove().static String
-
Field Details
-
EMPTY_TYPE_ARRAY
-
-
Method Details
-
makeKeySafe
Returns an equivalent type that's safe for use in a key. The returned type will be free of primitive types. Type literals of primitives will return the corresponding wrapper types.- Throws:
ConfigurationException- iftypecontains a type variable
-
canonicalize
Returns a type that is functionally equal but not necessarily equal according toObject.equals(). -
getRawType
-
equals
Returns true ifaandbare equal. -
hashCode
Returns the hashCode oftype. -
toString
-
memberType
ReturnsField.class,Method.classorConstructor.class. -
toString
Formats a member as concise string, such asjava.util.ArrayList.size,java.util.ArrayList<init>()orjava.util.List.remove(). -
getGenericSupertype
Returns the generic supertype forsupertype. For example, given a classIntegerSet, the result for when supertype isSet.classisSet<Integer>and the result when the supertype isCollection.classisCollection<Integer>. -
resolveTypeVariable
-