Package org.apache.tuscany.sca.binding.corba.provider.exceptions

Examples of org.apache.tuscany.sca.binding.corba.provider.exceptions.RequestConfigurationException


            if (note != null) {
                int fieldMod = forClass.getDeclaredFields()[i].getModifiers();
                if (Modifier.isPrivate(fieldMod) && !Modifier.isFinal(fieldMod) && !Modifier.isStatic(fieldMod)) {
                    if (note.type().equals(CorbaUnionElementType.discriminator)) {
                        if (discriminatorPresent) {
                            throw new RequestConfigurationException(
                                                                    "More than one discriminators declared on: " + forClass);
                        }
                        discriminatorPresent = true;
                    } else {
                        atLeastOneOption = true;
                    }
                } else {
                    throw new RequestConfigurationException(
                                                            "Annotated union field should be private, not final and no static on class: " + forClass);
                }
            }
        }
        if (atLeastOneOption && !discriminatorPresent) {
            throw new RequestConfigurationException("No discriminator annotation found on: " + forClass);
        } else if (!atLeastOneOption && discriminatorPresent) {
            throw new RequestConfigurationException("No union option found on: " + forClass);
        } else if (discriminatorPresent && atLeastOneOption) {
            return true;
        } else {
            return false;
        }
View Full Code Here


                    attributes.setDiscriminatorName(forClass.getDeclaredFields()[i].getName());
                } else if (note.type().equals(CorbaUnionElementType.defaultOption)) {
                    attributes.setDefaultOptionName(forClass.getDeclaredFields()[i].getName());
                } else if (note.type().equals(CorbaUnionElementType.option)) {
                    if (attributes.getOptionsMapping().containsKey(note.optionNumber())) {
                        throw new RequestConfigurationException("In " + forClass
                            + ": field \""
                            + forClass.getDeclaredFields()[i].getName()
                            + "\" uses already used option id: "
                            + note.optionNumber());
                    } else {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.corba.provider.exceptions.RequestConfigurationException

Copyright © 2018 www.massapicom. 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.