|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.util.ClassInfo
public final class ClassInfo
Parses class information to determine data key name/value pairs associated with the class.
| Field Summary | |
|---|---|
Class<?> |
clazz
Deprecated. (scheduled to be made private in 1.5) Use getUnderlyingClass() |
| Method Summary | ||
|---|---|---|
static Class<?> |
getCollectionParameter(Field field)
Deprecated. (scheduled to be removed in 1.5) use Types.getIterableParameter(Type) on
the Field.getGenericType() |
|
Field |
getField(String name)
Returns the field for the given FieldInfo.getName(). |
|
FieldInfo |
getFieldInfo(String name)
Returns the information for the given FieldInfo.getName(). |
|
int |
getKeyCount()
Deprecated. (scheduled to be removed in 1.5) Use getNames().size() |
|
Collection<String> |
getKeyNames()
Deprecated. (scheduled to be removed in 1.5) Use getNames() |
|
static Class<?> |
getMapValueParameter(Field field)
Deprecated. (scheduled to be removed in 1.5) use Types.getMapValueParameter(Type) on
the Field.getGenericType() |
|
static Class<?> |
getMapValueParameter(Type genericType)
Deprecated. (scheduled to be removed in 1.5) use Types.getMapValueParameter(Type) |
|
Collection<String> |
getNames()
Returns an unmodifiable sorted set (with any possible null member first) of
names. |
|
Class<?> |
getUnderlyingClass()
Returns the underlying class. |
|
boolean |
isEnum()
Returns the underlying class is an enum. |
|
static Collection<Object> |
newCollectionInstance(Class<?> collectionClass)
Deprecated. (scheduled to be removed in 1.5) use Data.newCollectionInstance(Type) |
|
static
|
newInstance(Class<T> clazz)
Deprecated. (scheduled to be removed in 1.5) use Types.newInstance(Class) |
|
static Map<String,Object> |
newMapInstance(Class<?> mapClass)
Deprecated. (scheduled to be removed in 1.5) use Data.newMapInstance(Class) |
|
static ClassInfo |
of(Class<?> underlyingClass)
Returns the class information for the given underlying class. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public final Class<?> clazz
getUnderlyingClass()
| Method Detail |
|---|
public static ClassInfo of(Class<?> underlyingClass)
underlyingClass - underlying class or null for null result
null for null inputpublic Class<?> getUnderlyingClass()
public FieldInfo getFieldInfo(String name)
FieldInfo.getName().
name - FieldInfo.getName() or null
null for nonepublic Field getField(String name)
FieldInfo.getName().
name - FieldInfo.getName() or null
null for nonepublic boolean isEnum()
@Deprecated public int getKeyCount()
getNames().size()
@Deprecated public Collection<String> getKeyNames()
getNames()
public Collection<String> getNames()
null member first) of
names.
@Deprecated public static <T> T newInstance(Class<T> clazz)
Types.newInstance(Class)
@Deprecated public static Collection<Object> newCollectionInstance(Class<?> collectionClass)
Data.newCollectionInstance(Type)
If a concrete collection class in the The class of the returned collection instance depends on the input collection class as follows (first that matches):
null or ArrayList is an instance of the collection class: returns an
ArrayListCollection: returns an instance of that collection classHashSet is an instance of the collection class: returns a HashSetTreeSet is an instance of the collection class: returns a TreeSet
collectionClass - collection class or null for ArrayList.
@Deprecated public static Map<String,Object> newMapInstance(Class<?> mapClass)
Data.newMapInstance(Class)
@Deprecated public static Class<?> getCollectionParameter(Field field)
Types.getIterableParameter(Type) on
the Field.getGenericType()
@Deprecated public static Class<?> getMapValueParameter(Field field)
Types.getMapValueParameter(Type) on
the Field.getGenericType()
@Deprecated public static Class<?> getMapValueParameter(Type genericType)
Types.getMapValueParameter(Type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||