boolean isValidJimpleName(String prospectiveName){
  if (prospectiveName == null)   return false;
  for (int i=0; i < prospectiveName.length(); i++) {
    char c=prospectiveName.charAt(i);
    if (i == 0 && c >= '0' && c <= '9')     return false;
    if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')|| (c == '_' || c == '$')))     return false;
  }
  return true;
}

boolean isValidJimpleName ( String prospectiveName ) { if ( prospectiveName == null ) return false ; for ( int i = 0 ; i < prospectiveName . length ( ) ; i ++ ) { char c = prospectiveName . charAt ( i ) ; if ( i == 0 && c >= '0' && c <= '9' ) return false ; if ( ! ( ( c >= '0' && c <= '9' ) || ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) || ( c == '_' || c == '$' ) ) ) return false ; } return true ; }
verifies the prospective name for validity as a jimple name . in particular , first - char is alpha | _ | $ , subsequent - chars are alphanum | _ | $ . we could use isjavaidentifier , except that jimple ' s grammar doesn ' t support all of those , just ascii . i ' d put this in soot . local , but that ' s an interface .
