private static boolean checkSerial(MethodDesc[] descs) throws InvalidObjectException{ try { return check(descs); } catch (RuntimeException e) { rethrow(e); } return true; }
/** * 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); } }
/** * 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(); }
/** * 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()); }
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);