( String name, Class [] sig )
| 924 | } |
| 925 | |
| 926 | protected BshMethod getImportedMethod( String name, Class [] sig ) |
| 927 | throws UtilEvalError |
| 928 | { |
| 929 | // Try object imports |
| 930 | if ( importedObjects != null ) |
| 931 | for(int i=0; i<importedObjects.size(); i++) |
| 932 | { |
| 933 | Object object = importedObjects.get(i); |
| 934 | Class clas = object.getClass(); |
| 935 | Method method = Reflect.resolveJavaMethod( |
| 936 | getClassManager(), clas, name, sig, false/*onlyStatic*/ ); |
| 937 | if ( method != null ) |
| 938 | return new BshMethod( method, object ); |
| 939 | } |
| 940 | |
| 941 | // Try static imports |
| 942 | if ( importedStatic!= null ) |
| 943 | for(int i=0; i<importedStatic.size(); i++) |
| 944 | { |
| 945 | Class clas = importedStatic.get(i); |
| 946 | Method method = Reflect.resolveJavaMethod( |
| 947 | getClassManager(), clas, name, sig, true/*onlyStatic*/ ); |
| 948 | if ( method != null ) |
| 949 | return new BshMethod( method, null/*object*/ ); |
| 950 | } |
| 951 | |
| 952 | return null; |
| 953 | } |
| 954 | |
| 955 | protected Variable getImportedVar( String name ) |
| 956 | throws UtilEvalError |
no test coverage detected