コード例 #1
0
 /**
  * INTERNAL: Verify that getter returnType is an appropriate collection type for the indirection
  * policy. If it is incorrect, add an exception to the integrity checker. In this case, the type
  * MUST be a Vector (or, in the case of jdk1.2, Collection or Map).
  */
 public void validateGetMethodReturnTypeForCollection(Class returnType, IntegrityChecker checker)
     throws DescriptorException {
   super.validateGetMethodReturnTypeForCollection(returnType, checker);
   if (!this.collectionTypeIsValid(returnType)) {
     checker.handleError(DescriptorException.getMethodReturnTypeNotValid(getCollectionMapping()));
   }
 }
コード例 #2
0
 /**
  * INTERNAL: Verify that setter parameterType is an appropriate collection type for the
  * indirection policy. If it is incorrect, add an exception to the integrity checker. In this
  * case, the type MUST be a Vector (or, in the case of jdk1.2, Collection or Map).
  */
 public void validateSetMethodParameterTypeForCollection(
     Class parameterType, IntegrityChecker checker) throws DescriptorException {
   super.validateSetMethodParameterTypeForCollection(parameterType, checker);
   if (!this.collectionTypeIsValid(parameterType)) {
     checker.handleError(
         DescriptorException.setMethodParameterTypeNotValid(getCollectionMapping()));
   }
 }
コード例 #3
0
 /**
  * INTERNAL: Verify that setter parameterType is correct for the indirection policy. If it is
  * incorrect, add an exception to the integrity checker. In this case, the parameter type CANNOT
  * be ValueHolderInterface.
  */
 public void validateSetMethodParameterType(Class parameterType, IntegrityChecker checker)
     throws DescriptorException {
   super.validateSetMethodParameterType(parameterType, checker);
   if (!this.typeIsValid(parameterType)) {
     checker.handleError(
         DescriptorException.parameterAndMappingWithoutIndirectionMismatch(this.mapping));
   }
 }
コード例 #4
0
 /**
  * INTERNAL: Verify that getter returnType is correct for the indirection policy. If it is
  * incorrect, add an exception to the integrity checker. In this case, the return type CANNOT be
  * ValueHolderInterface.
  */
 public void validateGetMethodReturnType(Class returnType, IntegrityChecker checker)
     throws DescriptorException {
   super.validateGetMethodReturnType(returnType, checker);
   if (!this.typeIsValid(returnType)) {
     checker.handleError(
         DescriptorException.returnAndMappingWithoutIndirectionMismatch(this.mapping));
   }
 }
コード例 #5
0
 /**
  * INTERNAL: Verify that attributeType is correct for the indirection policy. If it is incorrect,
  * add an exception to the integrity checker. In this case, the attribute type CANNOT be
  * ValueHolderInterface.
  */
 public void validateDeclaredAttributeType(Class attributeType, IntegrityChecker checker)
     throws DescriptorException {
   super.validateDeclaredAttributeType(attributeType, checker);
   if (!this.typeIsValid(attributeType)) {
     checker.handleError(
         DescriptorException.attributeAndMappingWithoutIndirectionMismatch(this.mapping));
   }
 }
コード例 #6
0
 /**
  * INTERNAL: Verify that attributeType is an appropriate collection type for the indirection
  * policy. If it is incorrect, add an exception to the integrity checker. In this case, the type
  * MUST be a Vector (or, in the case of jdk1.2, Collection or Map).
  */
 public void validateDeclaredAttributeTypeForCollection(
     Class attributeType, IntegrityChecker checker) throws DescriptorException {
   super.validateDeclaredAttributeTypeForCollection(attributeType, checker);
   if (!this.collectionTypeIsValid(attributeType)) {
     InterfaceContainerPolicy policy =
         (InterfaceContainerPolicy) getCollectionMapping().getContainerPolicy();
     checker.handleError(
         DescriptorException.attributeTypeNotValid(
             this.getCollectionMapping(), policy.getInterfaceType()));
   }
 }