org.apache.ignite.internal.util.tostring

## Class GridToStringBuilder

- java.lang.Object
- - org.apache.ignite.internal.util.tostring.GridToStringBuilder

Direct Known Subclasses:
  S

    public class GridToStringBuilder
    extends Object

Provides auto-generation framework for `toString()` output.

Default exclusion policy (can be overridden with `GridToStringInclude` annotation):

- fields with `GridToStringExclude` annotations
- classes that have `GridToStringExclude` annotation (current list):
  - GridManager
  - GridManagerRegistry
  - GridProcessor
  - GridProcessorRegistry
  - IgniteLogger
  - GridDiscoveryMetricsProvider
  - GridByteArrayList
- static fields
- non-private fields
- arrays
- fields of type `Object`
- fields of type `Thread`
- fields of type `Runnable`
- fields of type `Serializable`
- fields of type `Externalizable`
- `InputStream` implementations
- `OutputStream` implementations
- `EventListener` implementations
- `Lock` implementations
- `ReadWriteLock` implementations
- `Condition` implementations
- `Map` implementations
- `Collection` implementations

### Field Summary

Fields
`static int` `MAX_COL_SIZE` Maximum number of collection (map) entries to print.

### Constructor Summary

Constructors
Constructor and Description
`GridToStringBuilder()`

### Method Summary

Methods
`static <T> String` `toString(Class<T> cls, T obj)` Produces auto-generated output of string presentation for given object and its declaration class.
`static <T> String` `toString(Class<T> cls, T obj, String parent)` Produces auto-generated output of string presentation for given object and its declaration class.
`static <T> String` `toString(Class<T> cls, T obj, String name, Object val)` Produces auto-generated output of string presentation for given object and its declaration class.
`static <T> String` `toString(Class<T> cls, T obj, String name0, Object val0, String name1, Object val1)` Produces auto-generated output of string presentation for given object and its declaration class.
`static <T> String` `toString(Class<T> cls, T obj, String name0, Object val0, String name1, Object val1, String name2, Object val2)` Produces auto-generated output of string presentation for given object and its declaration class.
`static <T> String` `toString(Class<T> cls, T obj, String name0, Object val0, String name1, Object val1, String name2, Object val2, String name3, Object val3)` Produces auto-generated output of string presentation for given object and its declaration class.
`static <T> String` `toString(Class<T> cls, T obj, String name0, Object val0, String name1, Object val1, String name2, Object val2, String name3, Object val3, String name4, Object val4)` Produces auto-generated output of string presentation for given object and its declaration class.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MAX_COL_SIZE

    public static final int MAX_COL_SIZE

Maximum number of collection (map) entries to print.

See Also:
  Constant Field Values

### Constructor Detail

#### GridToStringBuilder

    public GridToStringBuilder()

### Method Detail

#### toString

    public static <T> String toString(Class<T> cls,
                      T obj,
                      String name0,
                      Object val0,
                      String name1,
                      Object val1,
                      String name2,
                      Object val2,
                      String name3,
                      Object val3,
                      String name4,
                      Object val4)

Produces auto-generated output of string presentation for given object and its declaration class.

Type Parameters:
  `T` - Type of the object.
Parameters:
  `cls` - Declaration class of the object. Note that this should not be a runtime class.
  `obj` - Object to get a string presentation for.
  `name0` - Additional parameter name.
  `val0` - Additional parameter value.
  `name1` - Additional parameter name.
  `val1` - Additional parameter value.
  `name2` - Additional parameter name.
  `val2` - Additional parameter value.
  `name3` - Additional parameter name.
  `val3` - Additional parameter value.
  `name4` - Additional parameter name.
  `val4` - Additional parameter value.
Returns:
  String presentation of the given object.

#### toString

    public static <T> String toString(Class<T> cls,
                      T obj,
                      String name0,
                      Object val0,
                      String name1,
                      Object val1,
                      String name2,
                      Object val2,
                      String name3,
                      Object val3)

Produces auto-generated output of string presentation for given object and its declaration class.

Type Parameters:
  `T` - Type of the object.
Parameters:
  `cls` - Declaration class of the object. Note that this should not be a runtime class.
  `obj` - Object to get a string presentation for.
  `name0` - Additional parameter name.
  `val0` - Additional parameter value.
  `name1` - Additional parameter name.
  `val1` - Additional parameter value.
  `name2` - Additional parameter name.
  `val2` - Additional parameter value.
  `name3` - Additional parameter name.
  `val3` - Additional parameter value.
Returns:
  String presentation of the given object.

#### toString

    public static <T> String toString(Class<T> cls,
                      T obj,
                      String name0,
                      Object val0,
                      String name1,
                      Object val1,
                      String name2,
                      Object val2)

Produces auto-generated output of string presentation for given object and its declaration class.

Type Parameters:
  `T` - Type of the object.
Parameters:
  `cls` - Declaration class of the object. Note that this should not be a runtime class.
  `obj` - Object to get a string presentation for.
  `name0` - Additional parameter name.
  `val0` - Additional parameter value.
  `name1` - Additional parameter name.
  `val1` - Additional parameter value.
  `name2` - Additional parameter name.
  `val2` - Additional parameter value.
Returns:
  String presentation of the given object.

#### toString

    public static <T> String toString(Class<T> cls,
                      T obj,
                      String name0,
                      Object val0,
                      String name1,
                      Object val1)

Produces auto-generated output of string presentation for given object and its declaration class.

Type Parameters:
  `T` - Type of the object.
Parameters:
  `cls` - Declaration class of the object. Note that this should not be a runtime class.
  `obj` - Object to get a string presentation for.
  `name0` - Additional parameter name.
  `val0` - Additional parameter value.
  `name1` - Additional parameter name.
  `val1` - Additional parameter value.
Returns:
  String presentation of the given object.

#### toString

    public static <T> String toString(Class<T> cls,
                      T obj,
                      String name,
                      @Nullable
                      Object val)

Produces auto-generated output of string presentation for given object and its declaration class.

Type Parameters:
  `T` - Type of the object.
Parameters:
  `cls` - Declaration class of the object. Note that this should not be a runtime class.
  `obj` - Object to get a string presentation for.
  `name` - Additional parameter name.
  `val` - Additional parameter value.
Returns:
  String presentation of the given object.

#### toString

    public static <T> String toString(Class<T> cls,
                      T obj)

Produces auto-generated output of string presentation for given object and its declaration class.

Type Parameters:
  `T` - Type of the object.
Parameters:
  `cls` - Declaration class of the object. Note that this should not be a runtime class.
  `obj` - Object to get a string presentation for.
Returns:
  String presentation of the given object.

#### toString

    public static <T> String toString(Class<T> cls,
                      T obj,
                      String parent)

Produces auto-generated output of string presentation for given object and its declaration class.

Type Parameters:
  `T` - Type of the object.
Parameters:
  `cls` - Declaration class of the object. Note that this should not be a runtime class.
  `obj` - Object to get a string presentation for.
  `parent` - String representation of parent.
Returns:
  String presentation of the given object.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.2.0-incubating
Release Date | : June 16 2015