public static JAXBException factoryClassWithoutFactoryMethod(String className) { Object[] args = { className }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, FACTORY_CLASS_WITHOUT_FACTORY_METHOD, args)); exception.setErrorCode(FACTORY_CLASS_WITHOUT_FACTORY_METHOD); return exception; }
public static JAXBException transientInProporder(String fieldName) { Object[] args = { fieldName }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, TRANSIENT_IN_PROP_ORDER, args)); exception.setErrorCode(TRANSIENT_IN_PROP_ORDER); return exception; }
public static JAXBException nonExistentPropertyInPropOrder(String fieldName) { Object[] args = { fieldName }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, NON_EXISTENT_PROPERTY_IN_PROP_ORDER, args)); exception.setErrorCode(NON_EXISTENT_PROPERTY_IN_PROP_ORDER); return exception; }
/** * PUBLIC: * Cause: ReadTransformer for the specified attribute of the specified class * specifies both class and method. */ public static JAXBException readTransformerHasBothClassAndMethod(String propertyName) { Object[] args = { propertyName }; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, READ_TRANSFORMER_HAS_BOTH_CLASS_AND_METHOD, args)); validationException.setErrorCode(READ_TRANSFORMER_HAS_BOTH_CLASS_AND_METHOD); return validationException; }
/** * PUBLIC: * Cause: ReadTransformer for the specified attribute of the specified class * specifies neither class nor method. */ public static JAXBException readTransformerHasNeitherClassNorMethod(String propertyName) { Object[] args = { propertyName }; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, READ_TRANSFORMER_HAS_NEITHER_CLASS_NOR_METHOD, args)); validationException.setErrorCode(READ_TRANSFORMER_HAS_NEITHER_CLASS_NOR_METHOD); return validationException; }
public static JAXBException samePropertyInMultipleFiles(String propertyName, String className) { Object[] args = {propertyName, className}; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, SAME_PROPERTY_IN_MULTIPLE_BINDINGS_FILES, args)); validationException.setErrorCode(SAME_PROPERTY_IN_MULTIPLE_BINDINGS_FILES); return validationException; }
public static JAXBException cannotRefreshMetadata() { Object[] args = { }; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, CANNOT_REFRESH_METADATA, args)); validationException.setErrorCode(CANNOT_REFRESH_METADATA); return validationException; }
/** * PUBLIC: * Cause: An exception occurred during schema generation. */ public static JAXBException exceptionDuringSchemaGeneration(Exception ex) { Object[] args = { }; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, EXCEPTION_DURING_SCHEMA_GEN, args), ex); validationException.setErrorCode(EXCEPTION_DURING_SCHEMA_GEN); return validationException; }
public static JAXBException invalidAccessorFactory(Object accessorFactoryClass, Exception nestedException) { Object[] args = {accessorFactoryClass}; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, INVALID_ACCESSOR_FACTORY, args), nestedException); validationException.setErrorCode(INVALID_ACCESSOR_FACTORY); return validationException; }
public static JAXBException invalidTypeForVariableNode(String attribute, String type, String className) { Object[] args = { attribute, type, className }; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, INVALID_TYPE_FOR_VARIABLE_MAPPING, args)); validationException.setErrorCode(INVALID_TYPE_FOR_VARIABLE_MAPPING); return validationException; }
public static JAXBException invalidElementWrapper(String propertyName) { Object[] args = { propertyName }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, INVALID_XML_ELEMENT_WRAPPER, args)); exception.setErrorCode(INVALID_XML_ELEMENT_WRAPPER); return exception; }
public static JAXBException missingPropertyInPropOrder(String fieldName, String className) { Object[] args = { fieldName, className }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, MISSING_PROPERTY_IN_PROP_ORDER, args)); exception.setErrorCode(MISSING_PROPERTY_IN_PROP_ORDER); return exception; }
public static JAXBException propertyOrFieldShouldBeAnAttribute(String fieldName) { Object[] args = { fieldName }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, XMLVALUE_ATTRIBUTE_CONFLICT, args)); exception.setErrorCode(XMLVALUE_ATTRIBUTE_CONFLICT); return exception; }
/** * This exception should be used when a TypeMappingInfo is specified but the Type is not set on it. * @param javaTypePackage * @param bindingsPackage * @return */ public static JAXBException javaTypeNotAllowedInBindingsFile(String javaTypePackage, String bindingsPackage) { Object[] args = { javaTypePackage, bindingsPackage }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, JAVATYPE_NOT_ALLOWED_IN_BINDINGS_FILE, args)); exception.setErrorCode(JAVATYPE_NOT_ALLOWED_IN_BINDINGS_FILE); return exception; }
/** * This exception is thrown if the user tries to create a new instance of DynamicJAXBContext using an * Node, that is not an instance of either Document or Element. */ public static JAXBException cannotInitializeFromNode() { Object[] args = { }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, CANNOT_INITIALIZE_FROM_NODE, args)); exception.setErrorCode(CANNOT_INITIALIZE_FROM_NODE); return exception; }
public static JAXBException classNotFoundException(String className) { Object[] args = { className }; JAXBException exception = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, CLASS_NOT_FOUND_EXCEPTION, args)); exception.setErrorCode(CLASS_NOT_FOUND_EXCEPTION); return exception; }
public static JAXBException xjbNotSource() { Object[] args = { }; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, XJB_NOT_SOURCE, args)); validationException.setErrorCode(XJB_NOT_SOURCE); return validationException; }
public static JAXBException errorCreatingFieldAccessor(Object accessorFactory, Exception nestedException) { Object[] args = {accessorFactory}; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, ERROR_CREATING_FIELD_ACCESSOR, args), nestedException); validationException.setErrorCode(ERROR_CREATING_FIELD_ACCESSOR); return validationException; }
public static JAXBException errorInvokingAccessor(Object accessor, String method, Exception nestedException) { Object[] args = {method, accessor}; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, ERROR_INVOKING_ACCESSOR, args), nestedException); validationException.setErrorCode(ERROR_INVOKING_ACCESSOR); return validationException; }
public static JAXBException invalidEnumValue(Object value, String theClassName, Exception nestedException) { Object[] args = {value, theClassName}; JAXBException validationException = new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class, INVALID_ENUM_VALUE, args), nestedException); validationException.setErrorCode(INVALID_ENUM_VALUE); return validationException; }