2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * ident "%Z%%M% %I% %E% SMI" 2N/A * A formatted string generated by the DTrace {@code printf()} action. 2N/A * @author Tom Erickson 2N/A * Need to prevent DefaultPersistenceDelegate from using 2N/A * overridden equals() method, resulting in a 2N/A * StackOverFlowError. Revert to PersistenceDelegate 2N/A * implementation. See 2N/A // package-level access, called by ProbeData 2N/A * Creates a record with the unformatted elements passed to the 2N/A * DTrace {@code printf()} action and the resulting formatted 2N/A * output. Supports XML persistence. 2N/A * @param v variable number of unformatted elements passed to the 2N/A * DTrace {@code printf()} action 2N/A * @param s formatted {@code printf()} output 2N/A * @throws NullPointerException if the given list or any of its 2N/A * elements is {@code null}, or if the given formatted string is 2N/A * Called by ProbeData code to populate record list. 2N/A * @throws NullPointerException if o is null 2N/A * Gets the formatted string output of the DTrace {@code printf()} 2N/A * @return non-null formatted string output of the DTrace {@code 2N/A * Package level access; called by ProbeData 2N/A * Gets the unfomatted elements passed to the DTrace {@code 2N/A * printf()} action after the format string. 2N/A * @return non-null, unmodifiable list of unformatted elements 2N/A * passed to the DTrace {@code printf()} action that generated this 2N/A * record, in the order they appear in the argument list after the 2N/A * Gets the number of DTrace {@code printf()} unformatted elements 2N/A * (arguments following the format string). For example, the 2N/A * printf("%s %d\n", "cat", 9); 2N/A * generates a {@code PrintfRecord} with a record count of two. 2N/A * @return the number of unformatted elements passed to the DTrace 2N/A * {@code printf()} action that generated this record. 2N/A * Gets the unformatted element passed to the DTrace {@code 2N/A * printf()} action at the given offset in the {@code printf()} 2N/A * argument list after the format string, starting at offset zero 2N/A * for the first unformatted element. 2N/A * @return non-null record representing the unformatted {@code 2N/A * printf()} element at the given index (using the same order that 2N/A * they appear in the {@code printf()} argument list) 2N/A * @throws ArrayIndexOutOfBoundsException if the given index is 2N/A * out of range (index < 0 || index >= getRecordCount()) 2N/A * Compares the specified object with this {@code PrintfRecord} for 2N/A * equality. Returns {@code true} if and only if the specified 2N/A * object is also a {@code PrintfRecord} and both records have the 2N/A * same formatted string and underlying data elements. 2N/A * @return {@code true} if and only if the specified object is also 2N/A * a {@code PrintfRecord} and both the formatted strings <i>and</i> 2N/A * the underlying data elements of both records are equal 2N/A * Overridden to ensure that equal instances have equal hash codes. 2N/A * Compares the formatted string value of this record with that of 2N/A * the given record. Note that ordering {@code printf} records by 2N/A * their string values is incompatible with {@link #equals(Object o) 2N/A * equals()}, which also checks the underlying data elements for 2N/A * @return a negative number, 0, or a positive number as this 2N/A * record's formatted string is lexicographically less than, equal 2N/A * to, or greater than the given record's formatted string 2N/A // Defensively copy record list before validating 2N/A * Gets the formatted string output of the DTrace {@code printf()}