Serializable
public class ObjectInstance extends Object implements Serializable
MBeanInfo
it provides.Constructor | Description |
---|---|
ObjectInstance |
Allows an object instance to be created given a string representation of an object name and the full class name, including the package name. |
ObjectInstance |
Allows an object instance to be created given an object name and the full class name, including the package name. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Compares the current object instance with another object instance. |
String |
getClassName() |
Returns the class part. |
ObjectName |
getObjectName() |
Returns the object name part. |
String |
toString() |
Returns a string representing this ObjectInstance object. |
public ObjectInstance(String objectName, String className) throws MalformedObjectNameException
objectName
- A string representation of the object name.className
- The full class name, including the package name, of the object instance. If the MBean is a Dynamic MBean the class name corresponds to its getMBeanInfo()
.getClassName()
.MalformedObjectNameException
- The string passed as a parameter does not have the right format.public ObjectInstance(ObjectName objectName, String className)
objectName
- The object name.className
- The full class name, including the package name, of the object instance. If the MBean is a Dynamic MBean the class name corresponds to its getMBeanInfo()
.getClassName()
. If the MBean is a Dynamic MBean the class name should be retrieved from the MBeanInfo
it provides.public boolean equals(Object object)
public ObjectName getObjectName()
public String getClassName()
public String toString()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.management/javax/management/ObjectInstance.html