1 4 7 package javax.xml.crypto.dsig.spec; 8 9 import java.util.ArrayList ; 10 import java.util.Collections ; 11 import java.util.List ; 12 import javax.xml.crypto.dsig.Transform; 13 14 26 public final class XPathFilter2ParameterSpec implements TransformParameterSpec { 27 28 private final List xPathList; 29 30 41 public XPathFilter2ParameterSpec(List xPathList) { 42 if (xPathList == null) { 43 throw new NullPointerException ("xPathList cannot be null"); 44 } 45 List xPathListCopy = new ArrayList (xPathList); 46 if (xPathListCopy.isEmpty()) { 47 throw new IllegalArgumentException ("xPathList cannot be empty"); 48 } 49 int size = xPathListCopy.size(); 50 for (int i = 0; i < size; i++) { 51 if (!(xPathListCopy.get(i) instanceof XPathType)) { 52 throw new ClassCastException 53 ("xPathList["+i+"] is not a valid type"); 54 } 55 } 56 this.xPathList = Collections.unmodifiableList(xPathListCopy); 57 } 58 59 68 public List getXPathList() { 69 return xPathList; 70 } 71 } 72 | Popular Tags |