Пример #1
0
 public void setFinal(final DerivationMethod derivation, final boolean enabled) {
   assertNotLocked();
   PreCondition.assertArgumentNotNull(derivation, "derivation");
   PreCondition.assertTrue(
       derivation.isExtension() || derivation.isRestriction(),
       "derivation (" + derivation + ") must be extension or restriction for a complex type");
   if (enabled) {
     m_final.add(derivation);
   } else {
     m_final.remove(derivation);
   }
 }
Пример #2
0
 private static SchemaWildcard computeAttributeWildcard(
     final Type baseType, final DerivationMethod derivation) {
   if (derivation.isRestriction()) {
     return null;
   }
   if (derivation.isExtension()) {
     if (baseType instanceof ComplexType) {
       return ((ComplexType) baseType).getAttributeWildcard();
     } else {
       return null;
     }
   } else {
     throw new AssertionError(derivation);
   }
 }