/** * Returns a hash code value for this object. */ public int hashCode() { return hash(descs); }
/** * Verifies legal descriptor ordering. * * @throws InvalidObjectException if any descriptor is <code>null</code>, * or the descriptors array is empty, or if any descriptor is preceded by * another descriptor that matches at least the same methods * * Default de-serialization is vulnerable to finalizer and reference * stealer attacks. */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); checkSerial(descs); }
return new BasicMethodConstraints(mdesc.toArray(new MethodDesc[mdesc.size()]));
/** * Creates an instance with the specified ordered array of descriptors. The {@link * #getConstraints getConstraints} method searches the descriptors in the specified order. For * any given descriptor in the array, no preceding descriptor can match at least the same * methods as the given descriptor; that is, more specific descriptors must precede less * specific descriptors. The array passed to the constructor is neither modified nor retained; * subsequent changes to that array have no effect on the instance created. * * @param descs the descriptors * @throws NullPointerException if the argument is <code>null</code> or any element of the * argument is <code>null</code> * @throws IllegalArgumentException if the descriptors array is empty, or if any descriptor is * preceded by another descriptor that matches at least the * same methods */ public BasicMethodConstraints(MethodDesc[] descs) { this.descs = descs.clone(); check(); }
((BasicMethodConstraints) obj).possibleConstraints(), ctx); } else if (obj instanceof InvocationConstraints) {
/** * Creates a new StringMethodConstraints instance from BasicMethodConstraints. * * @param constraints */ public StringMethodConstraints(BasicMethodConstraints constraints){ this(true, convert(constraints.getMethodDescs())); }
methodConstraints.getConstraints(from)); return new BasicMethodConstraints(descs);
/** * Creates an instance with the specified ordered array of descriptors. * The {@link #getConstraints getConstraints} method searches the * descriptors in the specified order. For any given descriptor in the * array, no preceding descriptor can match at least the same methods as * the given descriptor; that is, more specific descriptors must precede * less specific descriptors. The array passed to the constructor is * neither modified nor retained; subsequent changes to that array have * no effect on the instance created. * * @param descs the descriptors * @throws NullPointerException if the argument is <code>null</code> or * any element of the argument is <code>null</code> * @throws IllegalArgumentException if the descriptors array is empty, or * if any descriptor is preceded by another descriptor that matches at * least the same methods */ public BasicMethodConstraints(MethodDesc[] descs) { this(check(descs), descs.clone()); }
((BasicMethodConstraints) obj).possibleConstraints(), ctx); } else if (obj instanceof InvocationConstraints) {
methodConstraints.getConstraints(from)); return new BasicMethodConstraints(descs);
/** * Verifies legal descriptor ordering. * * @throws InvalidObjectException if any descriptor is <code>null</code>, or the descriptors * array is empty, or if any descriptor is preceded by another * descriptor that matches at least the same methods */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); try { check(); } catch (RuntimeException e) { rethrow(e); } }
/** * Returns a hash code value for this object. */ public int hashCode() { return hash(descs); }
/** * Constructor for {@link AtomicSerial}. * * @see AtomicSerial * @param arg GetArg serial fields * @throws IOException if there are I/O errors while reading from GetArg's * underlying <code>InputStream</code> * @throws InvalidObjectException if object invariants aren't satisfied. */ public BasicMethodConstraints(GetArg arg) throws IOException, ClassNotFoundException{ this(checkSerial(arg.get("descs", null, MethodDesc[].class)), arg.get("descs", new MethodDesc[0], MethodDesc[].class).clone()); }
if (constraints == null) { constraints = new BasicMethodConstraints(InvocationConstraints.EMPTY);
pname.regionMatches(1, dname, dlen - pname.length(), pname.length() - 1)) { check(prev, desc); if (pname.charAt(plen) == '*' && pname.regionMatches(0, dname, 0, plen)) { check(prev, desc); if (dname.regionMatches(dname.length() - plen, pname, 1, plen)) { check(prev, desc); check(prev, desc); check(prev, desc);
if (constraints == null) { constraints = new BasicMethodConstraints(InvocationConstraints.EMPTY);
if (relativeConstraints != absoluteConstraints) { convertedConstraints = new BasicMethodConstraints(absoluteConstraints);
if (discoveryConstraints == null) { discoveryConstraints = new BasicMethodConstraints(InvocationConstraints.EMPTY);