Examples of nameMethod()


Examples of org.freezedry.persistence.annotations.PersistEnum.nameMethod()

      // with the default date format
      final Field field = ReflectionUtils.getDeclaredField( containingClass, fieldName );
      annotation = field.getAnnotation( PersistEnum.class );
      if( annotation != null )
      {
        value = object.getClass().getMethod( annotation.nameMethod() ).invoke( object );
      }
    }
    catch( NoSuchFieldException e )
    {
      /* empty on purpose, this is ok, just means no annotation */
 
View Full Code Here

Examples of org.freezedry.persistence.annotations.PersistEnum.nameMethod()

    {
      final String error = "The method for getting the enums value specified in the annotation " + PersistEnum.class.getSimpleName() +
          " is not found. Please check the name of the method and compare to the enum you are attempting to persist." +
          "  Containing class: " + containingClass.getSimpleName() + Constants.NEW_LINE +
          "  Field name: " + fieldName + Constants.NEW_LINE +
          "  Annotated method name: " + annotation.nameMethod() + Constants.NEW_LINE;
      LOGGER.error( error, e );
      throw new IllegalStateException( error, e );
    }
    catch( InvocationTargetException | IllegalAccessException e )
    {
View Full Code Here

Examples of org.freezedry.persistence.annotations.PersistEnum.nameMethod()

    {
      final String error = "The method for getting the enums value specified in the annotation " + PersistEnum.class.getSimpleName() +
          " cannot be invoked." +
          "  Containing class: " + containingClass.getSimpleName() + Constants.NEW_LINE +
          "  Field name: " + fieldName + Constants.NEW_LINE +
          "  Annotated method name: " + annotation.nameMethod() + Constants.NEW_LINE;
      LOGGER.error( error, e );
      throw new IllegalStateException( error, e );
    }

    // grab the enum value using the default enum name
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.