public class ObjectInstance extends Object implements Serializable
DynamicMBean
, the class name may be
obtained using MBeanInfo.getClassName()
.Constructor and Description |
---|
ObjectInstance(ObjectName name,
String className)
Constructs a new
ObjectInstance for the specified bean
with the supplied class name. |
ObjectInstance(String name,
String className)
Constructs a new
ObjectInstance for the specified bean
with the supplied class name. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns true if the supplied object is also an
ObjectInstance
with the same bean and class name. |
String |
getClassName()
Returns the class name of the bean.
|
ObjectName |
getObjectName()
Returns the name of the bean.
|
int |
hashCode()
Returns a hash code for this instance.
|
public ObjectInstance(ObjectName name, String className)
ObjectInstance
for the specified bean
with the supplied class name. The class name should include
the full package name.name
- the name of the bean.className
- the class name of the bean.public ObjectInstance(String name, String className) throws MalformedObjectNameException
ObjectInstance
for the specified bean
with the supplied class name. The class name should include
the full package name.name
- the name of the bean.className
- the class name of the bean.MalformedObjectNameException
- if the name of the bean
does not match the syntax
of an ObjectName
.public boolean equals(Object obj)
ObjectInstance
with the same bean and class name.equals
in class Object
obj
- the object to compare.this
.Object.hashCode()
public String getClassName()
public ObjectName getObjectName()
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)