public ProxyPolicy(AbstractPolicy policy) { if (policy == null) throw new IllegalArgumentException("policy may not be null"); this.id = policy.getId().toString(); this.target = policy.getTarget(); if (policy instanceof Policy) this.refType = PolicyReference.POLICY_REFERENCE; if (policy instanceof PolicySet) this.refType = PolicyReference.POLICYSET_REFERENCE; }