From: Jesse P. <jp...@al...> - 2007-07-23 17:57:26
|
Hello, Can BeanShell not work with (the raw version of) types that have parameters? I have an interface and a class: public interface IdentifierProvider extends Iterable<String> public class CTagsFileProvider implements IdentifierProvider, Serializable and in a BeanShell script, I try to cast an instance of CTagsFileProvider to IdentifierProvider, but I get Target exception: java.lang.ClassCastException: Cannot cast com.illengineer.jcc.CTagsFileProvider to com.illengineer.j cc.IdentifierProvider at bsh.UtilTargetError.toEvalError(UtilTargetError.java:70) at bsh.UtilEvalError.toEvalError(UtilEvalError.java:90) at bsh.BSHCastExpression.eval(BSHCastExpression.java:68) at bsh.Interpreter.eval(Interpreter.java:645) at bsh.Interpreter.eval(Interpreter.java:739) at bsh.Interpreter.eval(Interpreter.java:728) even though CTagsFileProvider implements that interface, and the case can be performed in Java without a hitch. Thanks, Jesse |