public static Object resolveIdentAsEnumConst(String constant,EngineImportService engineImportService,boolean isAnnotation) throws ExprValidationException {
  int lastDotIndex=constant.lastIndexOf('.');
  if (lastDotIndex == -1) {
    return null;
  }
  String className=constant.substring(0,lastDotIndex);
  String constName=constant.substring(lastDotIndex + 1);
  className=unescape(className);
  constName=unescape(constName);
  Class clazz;
  try {
    clazz=engineImportService.resolveClass(className,isAnnotation);
  }
 catch (  EngineImportException e) {
    return null;
  }
  Field field;
  try {
    field=clazz.getField(constName);
  }
 catch (  NoSuchFieldException e) {
    return null;
  }
  int modifiers=field.getModifiers();
  if (Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers)) {
    try {
      return field.get(null);
    }
 catch (    IllegalAccessException e) {
      throw new ExprValidationException("Exception accessing field '" + field.getName() + "': "+ e.getMessage(),e);
    }
  }
  return null;
}

public static Object resolveIdentAsEnumConst ( String constant , EngineImportService engineImportService , boolean isAnnotation ) throws ExprValidationException { int lastDotIndex = constant . lastIndexOf ( '.' ) ; if ( lastDotIndex == - 1 ) { return null ; } String className = constant . substring ( 0 , lastDotIndex ) ; String constName = constant . substring ( lastDotIndex + 1 ) ; className = unescape ( className ) ; constName = unescape ( constName ) ; Class clazz ; try { clazz = engineImportService . resolveClass ( className , isAnnotation ) ; } catch ( EngineImportException e ) { return null ; } Field field ; try { field = clazz . getField ( constName ) ; } catch ( NoSuchFieldException e ) { return null ; } int modifiers = field . getModifiers ( ) ; if ( Modifier . isPublic ( modifiers ) && Modifier . isStatic ( modifiers ) ) { try { return field . get ( null ) ; } catch ( IllegalAccessException e ) { throw new ExprValidationException ( "Exception accessing field '" + field . getName ( ) + "': " + e . getMessage ( ) , e ) ; } } return null ; }
resolve a string constant as a possible enumeration value , returning null if not resolved .
