Package org.x2jb.bind

Examples of org.x2jb.bind.BindingException


        {
            return this.create( value );
        }
        catch ( NumberFormatException nfe )
        {
            throw new BindingException( AbstractHandler.INCORRECT_VALUE_MESSAGE + value, nfe );
        }
    }
View Full Code Here


    public Object bind( final Element e, final Class< ? > clazz )
    {
        final Node childNode = e.getFirstChild();
        if ( ( childNode == null ) || ( !( childNode instanceof Text ) ) )
        {
            throw new BindingException( "Text node expected" );
        }
        else
        {
            final String value = ( ( Text ) childNode ).getData();
            try
            {
                return this.create( value );
            }
            catch ( NumberFormatException nfe )
            {
                throw new BindingException( AbstractHandler.INCORRECT_VALUE_MESSAGE + value, nfe );
            }
        }
    }
View Full Code Here

        if ( this.isFalseString( lowerCasedValue ) )
        {
            return Boolean.FALSE;
        }

        throw new BindingException( "Incorrect value '" + value + "'" );
    }
View Full Code Here

        {
            bindingProperties.load( bindingResource );
        }
        catch ( IOException ioe )
        {
            throw new BindingException( ioe.getMessage(), ioe );
        }
        finally
        {
            try
            {
View Full Code Here

        {
            return new Character( value.charAt( 0 ) );
        }
        else
        {
            throw new BindingException( "Incorrect value '" + value + "'" );
        }
    }
View Full Code Here

        if ( clazz.equals( Direction.class ) )
        {
            return Direction.valueOf( attr.getNodeValue() );
        }

        throw new BindingException( "Handler doesn't support '" + clazz.getName() + "' class" );
    }
View Full Code Here

                    return sb.toString();
                }
            };
        }

        throw new BindingException( "Handler doesn't support '" + c.getName() + "' class" );
    }
View Full Code Here

        if ( c.equals( String.class ) )
        {
            return "My " + a.getValue();
        }

        throw new BindingException( "Handler doesn't support '" + c.getName() + "' class" );
    }
View Full Code Here

        if ( clazz.equals( Dispatcher.class ) )
        {
            return Dispatcher.valueOf( Handler.getTextContent( element ) );
        }

        throw new BindingException( "Handler doesn't support '" + clazz.getName() + "' class" );
    }
View Full Code Here

    {
        final Node childNode = e.getFirstChild();

        if ( ( childNode == null ) || ( !( childNode instanceof Text ) ) )
        {
            throw new BindingException( "Text node expected but not found" );
        }
        else
        {
            return ( ( Text ) childNode ).getData();
        }
View Full Code Here

TOP

Related Classes of org.x2jb.bind.BindingException

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.