Package javolution.xml.stream

Examples of javolution.xml.stream.XMLStreamException


            try {
                @SuppressWarnings( "unchecked" )
                final Enum<?> enumValue = Enum.valueOf( Class.forName( clazzName, true, _classLoader ).asSubclass( Enum.class ), value );
                return enumValue;
            } catch ( final ClassNotFoundException e ) {
                throw new XMLStreamException( e );
            }
        }
View Full Code Here


                final String componentType = input.getAttribute( "componentType", (String) null );
                final int length = input.getAttribute( "length", 0 );
                return (Object[]) Array.newInstance( Class.forName( componentType, false, _classLoader ), length );
            } catch ( final Exception e ) {
                LOG.error( "caught exception", e );
                throw new XMLStreamException( e );
            }
        }
View Full Code Here

                try {
                    final Constructor<?> constructor = REFLECTION_FACTORY.newConstructorForSerialization( cls, Object.class.getDeclaredConstructor( new Class[0] ) );
                    constructor.setAccessible( true );
                    return (Collection<Object>) constructor.newInstance( INITARGS );
                } catch ( final Exception e ) {
                    throw new XMLStreamException( e );
                }
            }

            if ( result == null ) {
                result = super.newInstance( cls, xml );
View Full Code Here

                try {
                    final Constructor<?> constructor = REFLECTION_FACTORY.newConstructorForSerialization( cls, Object.class.getDeclaredConstructor( new Class[0] ) );
                    constructor.setAccessible( true );
                    result = (Map<Object, Object>) constructor.newInstance( INITARGS );
                } catch ( final Exception e ) {
                    throw new XMLStreamException( e );
                }
            }

            if ( result == null ) {
                result = super.newInstance( cls, xml );
View Full Code Here

        private TimeZone getTimeZone( final Calendar obj ) throws XMLStreamException {
            /* access the timezone via the field, to prevent cloning of the tz */
            try {
                return (TimeZone) _zoneField.get( obj );
            } catch ( final Exception e ) {
                throw new XMLStreamException( e );
            }
        }
View Full Code Here

                    for ( int i = 0; i < interfaceNames.length; i++ ) {
                        interfaces[i] = Class.forName( interfaceNames[i], true, classLoader );
                    }
                    return interfaces;
                } catch ( final ClassNotFoundException e ) {
                    throw new XMLStreamException( e );
                }
            }
            return new Class<?>[0];
        }
View Full Code Here

    public Object newInstance( final Class<Object> cls, final InputElement xml ) throws XMLStreamException {
        final Class<?> superclass;
        try {
            superclass = Class.forName( xml.getAttribute( SUPERCLASS ).toString() );
        } catch ( final ClassNotFoundException e ) {
            throw new XMLStreamException( e );
        }
        /* this class should be loaded from the webapp, therefore we have access to the correct class loader
         */
        final ClassLoader classLoader = getClass().getClassLoader();
        final Class<?>[] interfaces = getInterfaces( xml, INTERFACES, classLoader );
View Full Code Here

TOP

Related Classes of javolution.xml.stream.XMLStreamException

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.