public boolean fieldIsSingleValueEnum(){
  Class<?> type=field.getType();
  return type.isEnum() && type.getEnumConstants().length == 1;
}

public boolean fieldIsSingleValueEnum ( ) { Class < ? > type = field . getType ( ) ; return type . isEnum ( ) && type . getEnumConstants ( ) . length == 1 ; }
returns whether the field is an enum with a single value .
