Gemfire JavaDocs_test
Class ClassName
- java.lang.Object
-
- org.apache.geode.management.configuration.ClassName
-
- All Implemented Interfaces:
java.io.Serializable
public class ClassName extends java.lang.Object implements java.io.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 gemfire-core module then properties can also be configured that will be used to initialize the instance.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassName(java.lang.String className)
Object to be instantiated using the empty param constructor of the classNameClassName(java.lang.String className, java.lang.String jsonInitProperties)
this is a convenient way to create a ClassName object using json represented propertiesClassName(java.lang.String className, java.util.Properties properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getClassName()
java.util.Properties
getInitProperties()
int
hashCode()
static boolean
isClassNameValid(java.lang.String className)
this provides a convenient method to validate if the given name is a valid classname
-
-
-
Field Detail
-
EMPTY
public static final ClassName EMPTY
Can be used when updating an attribute to configure it with no class name.
-
-
Constructor Detail
-
ClassName
public ClassName(java.lang.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(java.lang.String className, java.lang.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 constructorjsonInitProperties
- a json representation of the initialization properties that will be passed toorg.apache.geode.cache.Declarable#initialize
in the gemfire-core module. If the className is not Declarable, then these properties will be ignored- Throws:
java.lang.IllegalArgumentException
- if the class name is not validjava.lang.IllegalArgumentException
- if jsonInitProperties is invalid JSON
-
ClassName
public ClassName(java.lang.String className, java.util.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 toorg.apache.geode.cache.Declarable#initialize
in the gemfire-core module. If the className is not Declarable, then these properties will be ignored- Throws:
java.lang.IllegalArgumentException
- if classname contains illegal classname characters
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
- Returns:
- the name of the class
-
getInitProperties
public java.util.Properties getInitProperties()
- Returns:
- the properties that will be used when an instance is created.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
isClassNameValid
public static boolean isClassNameValid(java.lang.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
-
-