|
RiTa index |
|
| Name | RiTa.dynamicCast() |
| Class | RiTa |
| Description | Returns the passed in Object after dynamically casting
it to the specified interface. An example:
Object o = new Object() {
public void run() {
System.out.println("running...");
}};
Runnable r = (Runnable)RiTa.dynamicCast(o, Runnable.class);
r.run();
Note: 'toCast' must be a an instance of a public class. |
| Syntax | RiTa.dynamicCast(toCast, iface); RiTa.dynamicCast(toCast, ifaces); |
| Returns | java.lang.Object |
| Usage | Web & Application [static] |
| Related | |