/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management;
/**
* This abstract class provides the implementation of the CompositeData
* interface. A CompositeData object will be lazily created only when
* the CompositeData interface is used.
*
* Classes that extends this abstract class will implement the
* getCompositeData() method. The object returned by the
* getCompositeData() is an instance of CompositeData such that
* the instance serializes itself as the type CompositeDataSupport.
*/
public abstract class LazyCompositeData
implements CompositeData, Serializable {
// Implementation of the CompositeData interface
}
}
}
}
}
return compositeData().getCompositeType();
}
public int hashCode() {
return compositeData().hashCode();
}
/** FIXME: What should this be?? */
return compositeData().toString();
}
return compositeData().values();
}
/* Lazy creation of a CompositeData object
* only when the CompositeData interface is used.
*/
if (compositeData != null)
return compositeData;
return compositeData;
}
/**
* Designate to a CompositeData object when writing to an
* output stream during serialization so that the receiver
* only requires JMX 1.2 classes but not any implementation
* specific class.
*/
return compositeData();
}
/**
* Returns the CompositeData representing this object.
* The returned CompositeData object must be an instance
* of javax.management.openmbean.CompositeDataSupport class
* so that no implementation specific class is required
* for unmarshalling besides JMX 1.2 classes.
*/
// Helper methods
throw new IllegalArgumentException("Null CompositeData");
}
throw new IllegalArgumentException("Null CompositeData");
}
throw new IllegalArgumentException("Null CompositeData");
}
throw new IllegalArgumentException("Null CompositeData");
}
/**
* Compares two CompositeTypes and returns true if
* all items in type1 exist in type2 and their item types
* are the same.
*/
// We can't use CompositeType.isValue() since it returns false
// if the type name doesn't match.
// Check all items in the type1 exist in type2
return false;
if (ot1 instanceof CompositeType) {
if (! (ot2 instanceof CompositeType))
return false;
return false;
} else if (ot1 instanceof TabularType) {
if (! (ot2 instanceof TabularType))
return false;
return false;
return false;
}
}
return true;
}
// check if the list of index names are the same
return false;
}
}