( Class[] from, Class[] to, int round )
| 183 | */ |
| 184 | /* Should check for strict java here and limit to isJavaAssignable() */ |
| 185 | static boolean isSignatureAssignable( Class[] from, Class[] to, int round ) |
| 186 | { |
| 187 | if ( round != JAVA_VARARGS_ASSIGNABLE && from.length != to.length ) |
| 188 | return false; |
| 189 | |
| 190 | switch ( round ) |
| 191 | { |
| 192 | case JAVA_BASE_ASSIGNABLE: |
| 193 | for( int i=0; i<from.length; i++ ) |
| 194 | if ( !isJavaBaseAssignable( to[i], from[i] ) ) |
| 195 | return false; |
| 196 | return true; |
| 197 | case JAVA_BOX_TYPES_ASSIGABLE: |
| 198 | for( int i=0; i<from.length; i++ ) |
| 199 | if ( !isJavaBoxTypesAssignable( to[i], from[i] ) ) |
| 200 | return false; |
| 201 | return true; |
| 202 | case JAVA_VARARGS_ASSIGNABLE: |
| 203 | return isSignatureVarargsAssignable( from, to ); |
| 204 | case BSH_ASSIGNABLE: |
| 205 | for( int i=0; i<from.length; i++ ) |
| 206 | if ( !isBshAssignable( to[i], from[i] ) ) |
| 207 | return false; |
| 208 | return true; |
| 209 | default: |
| 210 | throw new InterpreterError("bad case"); |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | * Are the two signatures exactly equal? This is checked for a special |
no test coverage detected