Package com.codiform.moo

Examples of com.codiform.moo.TranslationException


  @Override
  public Object getValue(Object instance) {
    try {
      return field.get( instance );
    } catch( IllegalArgumentException exception ) {
      throw new TranslationException( "Cannot get value for property",
          exception );
    } catch( IllegalAccessException exception ) {
      throw new TranslationException( "Cannot access getter property",
          exception );
    }
  }
View Full Code Here


  public void setValue(Object instance, Object value) {
    checkValue( value );
    try {
      field.set( instance, value );
    } catch( IllegalArgumentException exception ) {
      throw new TranslationException(
          "Cannot set value for field property " + getName(),
          exception );
    } catch( IllegalAccessException exception ) {
      throw new TranslationException(
          "Cannot set value for field property " + getName(),
          exception );
    }
  }
View Full Code Here

  @Override
  public Object getValue(Object instance) {
    try {
      return field.get( instance );
    } catch( IllegalArgumentException exception ) {
      throw new TranslationException( "Cannot get value for property",
          exception );
    } catch( IllegalAccessException exception ) {
      throw new TranslationException( "Cannot access getter property",
          exception );
    }
  }
View Full Code Here

  public void setValue(Object instance, Object value) {
    checkValue( value );
    try {
      setter.invoke( instance, value );
    } catch( IllegalArgumentException exception ) {
      throw new TranslationException(
          "Cannot set value for field property " + getName(),
          exception );
    } catch( IllegalAccessException exception ) {
      throw new TranslationException(
          "Cannot set value for field property " + getName(),
          exception );
    } catch( InvocationTargetException exception ) {
      throw new TranslationException( "Cannot for method property "
          + getName(), exception );
    }
  }
View Full Code Here

    } else {
      try {
        getter.setAccessible( true );
        return getter.invoke( instance );
      } catch( IllegalArgumentException exception ) {
        throw new TranslationException( "Illegal argument to getter",
            exception );
      } catch( IllegalAccessException exception ) {
        throw new TranslationException( "Cannot access getter",
            exception );
      } catch( InvocationTargetException exception ) {
        throw new TranslationException( "Error while invoking getter",
            exception );
      }
    }
  }
View Full Code Here

        for( Object item : unmatched ) {
          destinationCollection.remove( item );
        }
      }
    } catch( InstantiationException e ) {
      throw new TranslationException( "Could not create matcher: "
          + matcherClass, e );
    } catch( IllegalAccessException e ) {
      throw new TranslationException( "Could not create matcher: "
          + matcherClass, e );
    }
  }
View Full Code Here

TOP

Related Classes of com.codiform.moo.TranslationException

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.