Package java.lang.reflect

Examples of java.lang.reflect.GenericSignatureFormatError


    for ( Method method : methods ) {
      Class<?>[] paramClasses = method.getParameterTypes();
      if ( paramClasses.length != 1 ) {
        // we don't know how to handle this
        throw new GenericSignatureFormatError();
      }
      Class<?> paramclass = paramClasses[0];
      // do some type safety. this would be the point to do automatic type conversions
      if ( value instanceof IPentahoResultSet && paramclass.equals( IPentahoResultSet.class ) ) {
        done = true;
View Full Code Here


    // that takes a single string
    for ( Method method : methodList ) {
      Class<?>[] paramClasses = method.getParameterTypes();
      if ( paramClasses.length != 1 ) {
        // we don't know how to handle this
        throw new GenericSignatureFormatError();
      }

      Class<?> paramclass = paramClasses[0];
      if ( paramclass.equals( String.class ) ) {
        done = true;
        method.invoke( pojo, new Object[] { value } );
        break;
      }
    }

    if ( !done ) {
      for ( Method method : methodList ) {
        Class<?>[] paramClasses = method.getParameterTypes();
        if ( paramClasses.length != 1 ) {
          // we don't know how to handle this
          throw new GenericSignatureFormatError();
        }

        Class<?> paramclass = paramClasses[0];
        if ( paramclass.equals( Boolean.class ) || paramclass.equals( boolean.class ) ) {
          done = true;
          method.invoke( pojo, new Object[] { new Boolean( value ) } );
          break;
        } else if ( paramclass.equals( Integer.class ) || paramclass.equals( int.class ) ) {
          done = true;
          method.invoke( pojo, new Object[] { new Integer( value ) } );
          break;
        } else if ( paramclass.equals( Long.class ) || paramclass.equals( long.class ) ) {
          done = true;
          method.invoke( pojo, new Object[] { new Long( value ) } );
          break;
        } else if ( paramclass.equals( Double.class ) || paramclass.equals( double.class ) ) {
          done = true;
          method.invoke( pojo, new Object[] { new Double( value ) } );
          break;
        } else if ( paramclass.equals( Float.class ) || paramclass.equals( float.class ) ) {
          done = true;
          method.invoke( pojo, new Object[] { new Float( value ) } );
          break;
        } else if ( paramclass.equals( BigDecimal.class ) ) {
          done = true;
          method.invoke( pojo, new Object[] { new BigDecimal( value ) } );
          break;
        }
      }
    }
    if ( !done ) {
      throw new GenericSignatureFormatError();
    }
  }
View Full Code Here

private void throwGenericSignatureFormatError() throws GenericSignatureFormatError {
   
    prntS("      throwGenericSignatureFormatError");

    clean();
    throw new GenericSignatureFormatError();
}
View Full Code Here

private void throwGenericSignatureFormatError() throws GenericSignatureFormatError {
   
    prntS("      throwGenericSignatureFormatError");

    clean();
    throw new GenericSignatureFormatError();
}
View Full Code Here

     * @tests java.lang.reflect.GenericSignatureFormatError#
     *        GenericSignatureFormatError()
     */
    @Test
    public void test_GenericSignatureFormatError() {
        GenericSignatureFormatError e = new GenericSignatureFormatError();
        assertNotNull(e);
        assertNull(e.getMessage());
    }
View Full Code Here

    // Takes a string error message as argument.
    // Currently throws a GenericSignatureFormatError.

    private Error error(String errorMsg) {
        if (DEBUG) System.out.println("Parse error:" + errorMsg);
        return new GenericSignatureFormatError();
    }
View Full Code Here

    private Error error(final String errorMsg) {
        if (DEBUG) {
            System.out.println("Parse error:" + errorMsg);
        }
        return new GenericSignatureFormatError();
    }
View Full Code Here

TOP

Related Classes of java.lang.reflect.GenericSignatureFormatError

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.