This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management
class ObjectInstance

java.lang.Object extended by javax.management.ObjectInstance
All Implemented Interfaces:
Serializable

Most common way to construct:

Iterator iterator = …;

ObjectInstance oi = (ObjectInstance)iterator.next();

Based on 22 examples


public class ObjectInstance
extends Object
implements Serializable

Used to represent the object name of an MBean and its class name. If the MBean is a Dynamic MBean the class name should be retrieved from the MBeanInfo it provides.


Constructor Summary
ObjectInstance(ObjectName objectName, String className)

          Allows an object instance to be created given an object name and the full class name, including the package name.
ObjectInstance(String objectName, String className)

          Allows an object instance to be created given a string representation of an object name and the full class name, including the package name.
 
Method Summary
 boolean
equals(Object object)

          Compares the current object instance with another object instance.
 String

          Returns the class part.
 ObjectName

          Returns the object name part.
 int

          Returns a hash code value for the object.
 String

          Returns a string representing this ObjectInstance object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectInstance

public ObjectInstance(ObjectName objectName,
                      String className)
Allows an object instance to be created given an object name and the full class name, including the package name.

Parameters:
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 {@link DynamicMBean#getMBeanInfo() getMBeanInfo()}.getClassName(). If the MBean is a Dynamic MBean the class name should be retrieved from the MBeanInfo it provides.

ObjectInstance

public ObjectInstance(String objectName,
                      String className)
               throws MalformedObjectNameException
Allows an object instance to be created given a string representation of an object name and the full class name, including the package name.

Parameters:
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 {@link DynamicMBean#getMBeanInfo() getMBeanInfo()}.getClassName().
Throws:
MalformedObjectNameException - The string passed as a parameter does not have the right format.
Method Detail

equals

public boolean equals(Object object)
Compares the current object instance with another object instance.

Overrides:
equals in class Object
Parameters:
object - The object instance that the current object instance is to be compared with.
Returns:
True if the two object instances are equal, otherwise false.

getClassName

public String getClassName()
Returns the class part.

Returns:
the class name.

getObjectName

public ObjectName getObjectName()
Returns the object name part.

Returns:
the object name.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns a string representing this ObjectInstance object. The format of this string is not specified, but users can expect that two ObjectInstances return the same string if and only if they are equal.

Overrides:
toString in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.