Lines Matching defs:extend

265      * You can also subclass non-abstract classes; for that you will need to use the {@link #extend(Object, Object...)}
578 * class. However, to extend a non-abstract class, you will have to use this method. Example:
581 * var ArrayListExtender = Java.extend(ArrayList)
597 * repeated invocations of {@code extend} for the same list of types for scripts same protection domain will yield
604 * <li>It is also possible to specify an ordinary JavaScript object as the last argument to {@code extend}. In that
605 * case, it is treated as a class-level override. {@code extend} will return an extender class where all instances
610 * var R1 = Java.extend(Runnable, {
622 * overrides on these objects, you will have to repeatedly use {@code extend()} to subclass the class-level adapter.
626 * var R2 = Java.extend(R1);
631 * Note that you must use {@code Java.extend} to explicitly create an instance-override adapter class from a
641 * interfaces that other types in the list already implement/extend, or {@code java.lang.Object} in a list of types
654 public static Object extend(final Object self, final Object... types) {
656 throw typeError("extend.expects.at.least.one.argument");
665 throw typeError("extend.expects.at.least.one.type.argument");
677 throw typeError("extend.expects.java.types");
681 // requesting the adapter class. Note that if Java.extend is invoked with no lookup object, it'll pass the
683 // is when the extend function is bound.
694 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java