static String format( String property, Object arg1 ) { return format( property, new Object[]{arg1} ); }
static String format( String property, Object arg1, Object arg2, Object arg3 ) { return format( property, new Object[]{arg1,arg2,arg3} ); }
static String format( String property ) { return format( property, null ); }
static String format( String property, Object arg1, Object arg2 ) { return format( property, new Object[]{arg1,arg2} ); }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Creates a new {@link javax.xml.transform.Source} for the given content object. * * @param context * JAXBContext that was used to create * <code>contentObject</code>. This context is used * to create a new instance of marshaller and must not be null. * @param contentObject * An instance of a JAXB-generated class, which will be * used as a {@link javax.xml.transform.Source} (by marshalling it into XML). It must * not be null. * @throws JAXBException if an error is encountered while creating the * JAXBSource or if either of the parameters are null. */ public JAXBSource( JAXBContext context, Object contentObject ) throws JAXBException { this( ( context == null ) ? assertionFailed( Messages.format( Messages.SOURCE_NULL_CONTEXT ) ) : context.createMarshaller(), ( contentObject == null ) ? assertionFailed( Messages.format( Messages.SOURCE_NULL_CONTENT ) ) : contentObject); }
public boolean handleEvent( ValidationEvent event ) { events.add(event); boolean retVal = true; switch( event.getSeverity() ) { case ValidationEvent.WARNING: retVal = true; // continue validation break; case ValidationEvent.ERROR: retVal = true; // continue validation break; case ValidationEvent.FATAL_ERROR: retVal = false; // halt validation break; default: _assert( false, Messages.format( Messages.UNRECOGNIZED_SEVERITY, event.getSeverity() ) ); break; } return retVal; }
/** * Creates a new instance that uses the specified * Unmarshaller to unmarshal an object. * * <p> * This JAXBResult object will use the specified Unmarshaller * instance. It is the caller's responsibility not to use the * same Unmarshaller for other purposes while it is being * used by this object. * * <p> * The primary purpose of this method is to allow the client * to configure Unmarshaller. Unless you know what you are doing, * it's easier and safer to pass a JAXBContext. * * @param _unmarshaller the unmarshaller. This parameter must not be null. * @throws JAXBException if an error is encountered while creating the * JAXBResult or the Unmarshaller parameter is null. */ public JAXBResult( Unmarshaller _unmarshaller ) throws JAXBException { if( _unmarshaller == null ) throw new JAXBException( Messages.format( Messages.RESULT_NULL_UNMARSHALLER ) ); this.unmarshallerHandler = _unmarshaller.getUnmarshallerHandler(); super.setHandler(unmarshallerHandler); }
static String format( String property, Object arg1 ) { return format( property, new Object[]{arg1} ); }
static String format( String property, Object arg1, Object arg2 ) { return format( property, new Object[]{arg1,arg2} ); }
static String format( String property, Object arg1, Object arg2 ) { return format( property, new Object[]{arg1,arg2} ); }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }
/** * Hook to throw exception from the middle of a contructor chained call * to this */ private static Unmarshaller assertionFailed() throws JAXBException { throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) ); } }