Package javolution.text

Examples of javolution.text.CharArray


        final CharArray value = input.getAttribute( name );
        return value != null ? Byte.valueOf( TypeFormat.parseByte( value ) ) : defaultValue;
    }

    private Character getAttribute( final InputElement input, final String name, final Character defaultValue ) throws XMLStreamException {
        final CharArray value = input.getAttribute( name );
        if ( value != null ) {
            if ( value.length() > 1 ) {
                throw new XMLStreamException( "The attribute '" + name + "' of type Character has illegal value (length > 1): " + value );
            }
            return Character.valueOf( value.charAt( 0 ) );
        }
        return defaultValue;
    }
View Full Code Here


                final Class<?>[] parameterTypes = constructor.getParameterTypes();
                if ( parameterTypes.length == 0 ) {
                    return (T) constructor.newInstance();
                }
                else if ( parameterTypes.length == 1 && parameterTypes[0] == int.class ) {
                    final CharArray size = xml.getAttribute( SIZE );
                    if ( size != null ) {
                        return (T) constructor.newInstance( size.toInt() );
                    }
                }
            }
            if ( LOG.isDebugEnabled() && constructors.length > 0 ) {
                LOG.debug( "No suitable constructor found for map " + cls + ", available constructors:\n" +
View Full Code Here

        final DateTimeZone tz = readTimeZone( input );
        return new DateTime( millis, chronology.withZone( tz ) );
    }

    private Chronology readChronology( final javolution.xml.XMLFormat.InputElement input ) throws XMLStreamException {
        final CharArray chronologyId = input.getAttribute( CHRONOLOGY );
        return IdentifiableChronology.valueOfId( chronologyId != null ? chronologyId.toString() : null );
    }
View Full Code Here

        final CharArray chronologyId = input.getAttribute( CHRONOLOGY );
        return IdentifiableChronology.valueOfId( chronologyId != null ? chronologyId.toString() : null );
    }

    private DateTimeZone readTimeZone( final javolution.xml.XMLFormat.InputElement input ) throws XMLStreamException {
        final CharArray tz = input.getAttribute( TIME_ZONE );
        return tz != null ? DateTimeZone.forID( tz.toString() ) : DateTimeZone.getDefault();
    }
View Full Code Here

     * {@inheritDoc}
     */
    @SuppressWarnings( "unchecked" )
    @Override
    protected Class readClass( final XMLStreamReader reader, final boolean useAttributes ) throws XMLStreamException {
        final CharArray className = useAttributes
            ? reader.getAttributeValue( null, CLASS )
            : reader.getLocalName();
        try {
            return Class.forName( className.toString(), true, _classLoader );
        } catch ( final ClassNotFoundException e ) {
            throw new XMLStreamException( e );
        }
    }
View Full Code Here

TOP

Related Classes of javolution.text.CharArray

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.