com.google.api.client.util
Class ClassInfo

java.lang.Object
  extended by com.google.api.client.util.ClassInfo

public final class ClassInfo
extends Object

Parses class information to determine data key name/value pairs associated with the class.

Implementation is thread-safe.

Since:
1.0
Author:
Yaniv Inbar

Method Summary
 Field getField(String name)
          Returns the field for the given FieldInfo.getName().
 FieldInfo getFieldInfo(String name)
          Returns the information for the given FieldInfo.getName().
 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 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
 

Method Detail

of

public static ClassInfo of(Class<?> underlyingClass)
Returns the class information for the given underlying class.

Parameters:
underlyingClass - underlying class or null for null result
Returns:
class information or null for null input

getUnderlyingClass

public Class<?> getUnderlyingClass()
Returns the underlying class.

Since:
1.4

getFieldInfo

public FieldInfo getFieldInfo(String name)
Returns the information for the given FieldInfo.getName().

Parameters:
name - FieldInfo.getName() or null
Returns:
field information or null for none

getField

public Field getField(String name)
Returns the field for the given FieldInfo.getName().

Parameters:
name - FieldInfo.getName() or null
Returns:
field or null for none

isEnum

public boolean isEnum()
Returns the underlying class is an enum.

Since:
1.4

getNames

public Collection<String> getNames()
Returns an unmodifiable sorted set (with any possible null member first) of names.



Copyright © 2011 Google. All Rights Reserved.