# Class ClassInfo (2.1.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.1.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.ClassInfo)
- [2.0.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/2.0.3/com.google.api.client.util.ClassInfo)
- [1.47.1](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.47.1/com.google.api.client.util.ClassInfo)
- [1.46.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.46.3/com.google.api.client.util.ClassInfo)
- [1.45.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.45.3/com.google.api.client.util.ClassInfo)
- [1.44.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.44.2/com.google.api.client.util.ClassInfo)
- [1.43.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.43.2/com.google.api.client.util.ClassInfo)
- [1.42.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.42.3/com.google.api.client.util.ClassInfo)
- [1.41.8](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.41.8/com.google.api.client.util.ClassInfo)

    public final class ClassInfo

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

Implementation is thread-safe.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> ClassInfo

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### of(Class\<?\> underlyingClass)

    public static ClassInfo of(Class<?> underlyingClass)

Returns the class information for the given underlying class.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `underlyingClass` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<?>` underlying class or `null` for `null` result |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.ClassInfo` | class information or `null` for `null` input |

### of(Class\<?\> underlyingClass, boolean ignoreCase)

    public static ClassInfo of(Class<?> underlyingClass, boolean ignoreCase)

Returns the class information for the given underlying class.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `underlyingClass` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<?>` underlying class or `null` for `null` result |
| `ignoreCase` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` whether field names are case sensitive |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.ClassInfo` | class information or `null` for `null` input |

## Methods

### getField(String name)

    public Field getField(String name)

Returns the field for the given [FieldInfo#getName()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.FieldInfo#com_google_api_client_util_FieldInfo_getName__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` [FieldInfo#getName()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.FieldInfo#com_google_api_client_util_FieldInfo_getName__) or `null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html` | field or `null` for none |

### getFieldInfo(String name)

    public FieldInfo getFieldInfo(String name)

Returns the information for the given [FieldInfo#getName()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.FieldInfo#com_google_api_client_util_FieldInfo_getName__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` [FieldInfo#getName()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.FieldInfo#com_google_api_client_util_FieldInfo_getName__) or `null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.FieldInfo` | field information or `null` for none |

### getFieldInfos()

    public Collection<FieldInfo> getFieldInfos()

Returns an unmodifiable collection of the `FieldInfo`s for this class, without any
guarantee of order.

If you need sorted order, instead use [#getNames()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.ClassInfo#com_google_api_client_util_ClassInfo_getNames__) with [#getFieldInfo(String)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.ClassInfo#com_google_api_client_util_ClassInfo_getFieldInfo_java_lang_String_).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html<https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.FieldInfo>` |   |

### getIgnoreCase()

    public final boolean getIgnoreCase()

Returns whether field names are case sensitive.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getNames()

    public Collection<String> getNames()

Returns an unmodifiable sorted set (with any possible `null` member first) of [names](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.FieldInfo#com_google_api_client_util_FieldInfo_getName__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getUnderlyingClass()

    public Class<?> getUnderlyingClass()

Returns the underlying class.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<?>` |   |

### isEnum()

    public boolean isEnum()

Returns the underlying class is an enum.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |