MCPcopy Index your code
hub / github.com/beanshell/beanshell / isSignatureAssignable

Method isSignatureAssignable

src/bsh/Types.java:185–212  ·  view source on GitHub ↗
( Class[] from, Class[] to, int round )

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 4

isJavaBaseAssignableMethod · 0.95
isBshAssignableMethod · 0.95

Tested by

no test coverage detected