ClassName (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.management.configuration, class: ClassName

Package org.apache.geode.management.configuration

# Class ClassName

java.lang.Object
org.apache.geode.management.configuration.ClassName

All Implemented Interfaces:
  `Serializable`

public class ClassName extends Object implements Serializable
Used to configure an attribute that represents an instance of a java class. If the class implements the org.apache.geode.cache.Declarable interface from the geode-core module then properties can also be configured that will be used to initialize the instance.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ClassName`
  `EMPTY`
  Can be used when updating an attribute to configure it with no class name.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassName(String className)`
  Object to be instantiated using the empty param constructor of the className
  `ClassName(String className, String jsonInitProperties)`
  this is a convenient way to create a ClassName object using json represented properties
  `ClassName(String className, Properties properties)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `String`
  `getClassName()`
  `Properties`
  `getInitProperties()`
  `int`
  `hashCode()`
  `static boolean`
  `isClassNameValid(String className)`
  this provides a convenient method to validate if the given name is a valid classname

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

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

- ## Field Details

  - ### EMPTY

    public static final ClassName EMPTY
    Can be used when updating an attribute to configure it with no class name.

- ## Constructor Details

  - ### ClassName

    public ClassName(String className)
    Object to be instantiated using the empty param constructor of the className
    Parameters:
      `className` - this class needs a no-arg constructor.

  - ### ClassName

    public ClassName(String className, String jsonInitProperties)
    this is a convenient way to create a ClassName object using json represented properties
    Parameters:
      `className` - this class needs to have a no-arg constructor
      `jsonInitProperties` - a json representation of the initialization properties that will be passed to `org.apache.geode.cache.Declarable#initialize` in the geode-core module. If the className is not Declarable, then these properties will be ignored
    Throws:
      `IllegalArgumentException` - if the class name is not valid
      `IllegalArgumentException` - if jsonInitProperties is invalid JSON

  - ### ClassName

    public ClassName(String className, Properties properties)
    Parameters:
      `className` - the name of the class to be instantiated. This class needs to have a no-arg constructor.
      `properties` - the initialization properties that will be passed to `org.apache.geode.cache.Declarable#initialize` in the geode-core module. If the className is not Declarable, then these properties will be ignored
    Throws:
      `IllegalArgumentException` - if classname contains illegal classname characters

- ## Method Details

  - ### getClassName

    public String getClassName()
    Returns:
      the name of the class

  - ### getInitProperties

    public Properties getInitProperties()
    Returns:
      the properties that will be used when an instance is created.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### isClassNameValid

    public static boolean isClassNameValid(String className)
    this provides a convenient method to validate if the given name is a valid classname
    Parameters:
      `className` - the class name to be validated
    Returns:
      false if classname is blank or has invalid classname characters