Examples of DuplicateReferenceException


Examples of com.iggroup.oss.sample.domain.exception.DuplicateReferenceException

    *
    * @param sample the sample to be created
    */
   public void createSample(Sample sample) {
      if (database.containsKey(sample.getReference())) {
         throw new DuplicateReferenceException(sample.getReference());
      }
      database.put(sample.getReference(), sample);
   }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateReferenceException

            name = JavaIntrospectionHelper.toPropertyName(method.getName());
        }
        JavaElementImpl ref = type.getReferenceMembers().get(name);
        // Setter override field
        if (ref != null && ref.getElementType() != ElementType.FIELD) {
            throw new DuplicateReferenceException(name);
        }
        removeReference(ref, type);

        JavaElementImpl element = new JavaElementImpl(method, 0);
        org.apache.tuscany.sca.assembly.Reference reference = createReference(element, name);
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateReferenceException

        if ("".equals(name)) {
            name = field.getName();
        }
        JavaElementImpl ref = type.getReferenceMembers().get(name);
        if (ref != null && ref.getElementType() == ElementType.FIELD) {
            throw new DuplicateReferenceException(name);
        }

        // Setter method override field
        if (ref == null) {
            JavaElementImpl element = new JavaElementImpl(field);
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateReferenceException

            name = method.getDeclaringClass().getName()+"_"+name;
        }
        JavaElementImpl ref = type.getReferenceMembers().get(name);
        // Setter override field
        if (ref != null && ref.getElementType() != ElementType.FIELD) {
            throw new DuplicateReferenceException(name);
        }
        removeReference(ref, type);

        JavaElementImpl element = new JavaElementImpl(method, 0);
        org.apache.tuscany.sca.assembly.Reference reference = createReference(element, name);
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateReferenceException

            // When the name is not specified, prefix the computed name with the class name
            name = field.getDeclaringClass().getName()+"_"+name;
        }
        JavaElementImpl ref = type.getReferenceMembers().get(name);
        if (ref != null && ref.getElementType() == ElementType.FIELD) {
            throw new DuplicateReferenceException(name);
        }

        // Setter method override field
        if (ref == null) {
            JavaElementImpl element = new JavaElementImpl(field);
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateReferenceException

            name = JavaIntrospectionHelper.toPropertyName(method.getName());
        }
        JavaElementImpl ref = type.getReferenceMembers().get(name);
        // Setter override field
        if (ref != null && ref.getElementType() != ElementType.FIELD) {
            throw new DuplicateReferenceException(name);
        }
        removeReference(ref, type);

        JavaElementImpl element = new JavaElementImpl(method, 0);
        org.apache.tuscany.sca.assembly.Reference reference = createReference(element, name);
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateReferenceException

        if ("".equals(name)) {
            name = field.getName();
        }
        JavaElementImpl ref = type.getReferenceMembers().get(name);
        if (ref != null && ref.getElementType() == ElementType.FIELD) {
            throw new DuplicateReferenceException(name);
        }

        // Setter method override field
        if (ref == null) {
            JavaElementImpl element = new JavaElementImpl(field);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.