Collection<Assertion> getAssertions(EffectivePolicy pc, boolean includeOptional) { if (pc == null || pc.getChosenAlternative() == null) { return null; } Collection<Assertion> assertions = new ArrayList<>(); for (Assertion assertion : pc.getChosenAlternative()) { if (Constants.TYPE_ASSERTION == assertion.getType()) { if (includeOptional || !assertion.isOptional()) { assertions.add(assertion); } } else { addAssertions(assertion, includeOptional, assertions); } } return assertions; }
Collection<Assertion> getAssertions(EffectivePolicy pc, boolean includeOptional) { if (pc == null || pc.getChosenAlternative() == null) { return null; } Collection<Assertion> assertions = new ArrayList<>(); for (Assertion assertion : pc.getChosenAlternative()) { if (Constants.TYPE_ASSERTION == assertion.getType()) { if (includeOptional || !assertion.isOptional()) { assertions.add(assertion); } } else { addAssertions(assertion, includeOptional, assertions); } } return assertions; }
if (effectivePolicy != null) { faultInterceptors.addAll(effectivePolicy.getInterceptors()); assertions.addAll(effectivePolicy.getChosenAlternative());
if (effectivePolicy != null) { faultInterceptors.addAll(effectivePolicy.getInterceptors()); assertions.addAll(effectivePolicy.getChosenAlternative());
); addInterceptors(effectivePolicy.getInterceptors(), msg); assertions.addAll(effectivePolicy.getChosenAlternative()); ); addInterceptors(effectivePolicy.getInterceptors(), msg); assertions.addAll(effectivePolicy.getChosenAlternative());
); addInterceptors(effectivePolicy.getInterceptors(), msg); assertions.addAll(effectivePolicy.getChosenAlternative()); ); addInterceptors(effectivePolicy.getInterceptors(), msg); assertions.addAll(effectivePolicy.getChosenAlternative());