fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * CDDL HEADER START
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * The contents of this file are subject to the terms of the
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Common Development and Distribution License (the "License").
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * You may not use this file except in compliance with the License.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * See the License for the specific language governing permissions
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * and limitations under the License.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * When distributing Covered Code, include this CDDL HEADER in each
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * If applicable, add the following below this CDDL HEADER, with the
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * fields enclosed by brackets "[]" replaced with your own identifying
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * information: Portions Copyright [yyyy] [name of copyright owner]
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * CDDL HEADER END
91cfa10a8e55050a5103c4b2e83b0bf8d783a7cbtomee * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Use is subject to license terms.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * ident "%Z%%M% %I% %E% SMI"
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Probe stability information. Does not identify a probe, but gives
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * information about a single probe identified by a {@link
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * ProbeDescription}. A {@code ProbeDescription} can match multiple
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * probes using pattern syntax (globbing) and wildcarding (field
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * omission), but it does not normally make sense to associate a {@code
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * ProbeInfo} with a {@code ProbeDescription} unless that description
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * matches exactly one probe on the system. A {@link Probe} pairs a
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * {@code ProbeDescription} with information about the DTrace probe it
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * identifies.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Immutable. Supports persistence using {@link java.beans.XMLEncoder}.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * @see Consumer#listProbeDetail(ProbeDescription filter)
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * @see Consumer#listProgramProbeDetail(Program program)
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * @author Tom Erickson
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee static final long serialVersionUID = 1057402669978245904L;
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee BeanInfo info = Introspector.getBeanInfo(ProbeInfo.class);
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee "argumentAttributes"})
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Need to prevent DefaultPersistenceDelegate from using
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * overridden equals() method, resulting in a
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * StackOverFlowError. Revert to PersistenceDelegate
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * implementation. See
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * 477019&tstart=135
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee protected boolean
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee d.setValue("persistenceDelegate", persistenceDelegate);
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee /** @serial */
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee /** @serial */
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Creates a {@code ProbeInfo} instance from the given attributes.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Supports XML persistence.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * @throws NullPointerException if any parameter is null
91cfa10a8e55050a5103c4b2e83b0bf8d783a7cbtomee private final void
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee throw new NullPointerException("probeAttributes is null");
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee throw new NullPointerException("argumentAttributes is null");
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Gets the interface attributes of a probe.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * @return non-null attributes including stability levels and
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * dependency class
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Gets the interface attributes of the arguments to a probe.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * @return non-null attributes including stability levels and
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * dependency class of the arguments to a probe
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Compares the specified object with this {@code ProbeInfo}
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * instance for equality. Defines equality as having equal probe
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * attributes and equal argument attributes.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * @return {@code true} if and only if the specified object is also
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * a {@code ProbeInfo} and both instances have the same attributes
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee public boolean
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee if (o instanceof ProbeInfo) {
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee return false;
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Overridden to ensure that equal instances have equal hash codes.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee private void
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee // Must copy before checking class invariants
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee } catch (Exception e) {
4ae67516a1d5dc4a5dbc761762bad5b596647388tomee InvalidObjectException x = new InvalidObjectException(
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * Gets a string representation of this {@code ProbeInfo} useful for
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * logging and not intended for display. The exact details of the
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * representation are unspecified and subject to change, but the
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * following format may be regarded as typical:
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * <pre><code>
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * class-name[property1 = value1, property2 = value2]
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee * </code></pre>