|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.common.inject.internal.MoreTypes
public class MoreTypes
Static methods for working with types that we aren't publishing in the
public Types
API.
Nested Class Summary | |
---|---|
static class |
MoreTypes.GenericArrayTypeImpl
|
static class |
MoreTypes.MemberImpl
We cannot serialize the built-in Java member classes, which prevents us from using Members in our exception types. |
static class |
MoreTypes.ParameterizedTypeImpl
|
static class |
MoreTypes.WildcardTypeImpl
The WildcardType interface supports multiple upper bounds and multiple lower bounds. |
Field Summary | |
---|---|
static Type[] |
EMPTY_TYPE_ARRAY
|
Method Summary | ||
---|---|---|
static Type |
canonicalize(Type type)
Returns a type that is functionally equal but not necessarily equal according to Object.equals() . |
|
static boolean |
equals(Type a,
Type b)
Returns true if a and b are equal. |
|
static Type |
getGenericSupertype(Type type,
Class<?> rawType,
Class<?> toResolve)
Returns the generic supertype for supertype . |
|
static Class<?> |
getRawType(Type type)
|
|
static int |
hashCode(Type type)
Returns the hashCode of type . |
|
static
|
makeKeySafe(TypeLiteral<T> type)
Returns an equivalent type that's safe for use in a key. |
|
static String |
memberKey(Member member)
|
|
static Class<? extends Member> |
memberType(Member member)
Returns Field.class , Method.class or Constructor.class . |
|
static Type |
resolveTypeVariable(Type type,
Class<?> rawType,
TypeVariable unknown)
|
|
static Member |
serializableCopy(Member member)
Returns a type that's functionally equal but not necessarily equal according to Object.equals . |
|
static String |
toString(Member member)
Formats a member as concise string, such as java.util.ArrayList.size ,
java.util.ArrayList<init>() or java.util.List.remove() . |
|
static String |
toString(Type type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Type[] EMPTY_TYPE_ARRAY
Method Detail |
---|
public static <T> TypeLiteral<T> makeKeySafe(TypeLiteral<T> type)
ConfigurationException
- if type
contains a type variablepublic static Type canonicalize(Type type)
Object.equals()
. The returned
type is Serializable
.
public static Member serializableCopy(Member member)
Object.equals
. The returned
member is Serializable
.
public static Class<?> getRawType(Type type)
public static boolean equals(Type a, Type b)
a
and b
are equal.
public static int hashCode(Type type)
type
.
public static String toString(Type type)
public static Class<? extends Member> memberType(Member member)
Field.class
, Method.class
or Constructor.class
.
public static String toString(Member member)
java.util.ArrayList.size
,
java.util.ArrayList<init>()
or java.util.List.remove()
.
public static String memberKey(Member member)
public static Type getGenericSupertype(Type type, Class<?> rawType, Class<?> toResolve)
supertype
. For example, given a class IntegerSet
, the result for when supertype is Set.class
is Set<Integer>
and the
result when the supertype is Collection.class
is Collection<Integer>
.
public static Type resolveTypeVariable(Type type, Class<?> rawType, TypeVariable unknown)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |