|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.ObjectInstance
public class ObjectInstance
A simple class used to link a bean instance to its class name.
If the bean is a DynamicMBean
, the class name may be
obtained using MBeanInfo.getClassName()
.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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
.Method Detail |
---|
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |