( String name )
| 953 | } |
| 954 | |
| 955 | protected Variable getImportedVar( String name ) |
| 956 | throws UtilEvalError |
| 957 | { |
| 958 | // Try object imports |
| 959 | if ( importedObjects != null ) |
| 960 | for(int i=0; i<importedObjects.size(); i++) |
| 961 | { |
| 962 | Object object = importedObjects.get(i); |
| 963 | Class clas = object.getClass(); |
| 964 | Field field = Reflect.resolveJavaField( |
| 965 | clas, name, false/*onlyStatic*/ ); |
| 966 | if ( field != null ) |
| 967 | return createVariable( |
| 968 | name, field.getType(), new LHS( object, field ) ); |
| 969 | } |
| 970 | |
| 971 | // Try static imports |
| 972 | if ( importedStatic!= null ) |
| 973 | for(int i=0; i<importedStatic.size(); i++) |
| 974 | { |
| 975 | Class clas = importedStatic.get(i); |
| 976 | Field field = Reflect.resolveJavaField( |
| 977 | clas, name, true/*onlyStatic*/ ); |
| 978 | if ( field != null ) |
| 979 | return createVariable( name, field.getType(), new LHS( field ) ); |
| 980 | } |
| 981 | |
| 982 | return null; |
| 983 | } |
| 984 | |
| 985 | /** |
| 986 | Load a command script from the input stream and find the BshMethod in |
no test coverage detected