throw Metamodel.newModelError("Unsupported declaration type: " + declaration + " of type "+declaration.getClass());
}
public static java.lang.reflect.Method getJavaMethod(com.redhat.ceylon.compiler.typechecker.model.Method declaration) {
if(declaration instanceof JavaMethod){
ReflectionMethod methodMirror = (ReflectionMethod) ((JavaMethod) declaration).mirror;
return (java.lang.reflect.Method) methodMirror.method;
}
if(declaration instanceof LazyMethod){
ReflectionMethod methodMirror = (ReflectionMethod) ((LazyMethod) declaration).getMethodMirror();
return (java.lang.reflect.Method) methodMirror.method;
}
throw Metamodel.newModelError("Unsupported declaration type: " + declaration);
}