Java Code Examples for jdk.nashorn.internal.runtime.linker.Bootstrap#createSuperAdapter()

The following examples show how to use jdk.nashorn.internal.runtime.linker.Bootstrap#createSuperAdapter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NativeJava.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 2
Source File: NativeJava.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 3
Source File: NativeJava.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 4
Source File: NativeJava.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 5
Source File: NativeJava.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 6
Source File: NativeJava.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 7
Source File: NativeJava.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 8
Source File: NativeJava.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 9
Source File: NativeJava.java    From jdk8u_nashorn with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}
 
Example 10
Source File: NativeJava.java    From nashorn with GNU General Public License v2.0 2 votes vote down vote up
/**
 * When given an object created using {@code Java.extend()} or equivalent mechanism (that is, any JavaScript-to-Java
 * adapter), returns an object that can be used to invoke superclass methods on that object. E.g.:
 * <pre>
 * var cw = new FilterWriterAdapter(sw) {
 *     write: function(s, off, len) {
 *         s = capitalize(s, off, len)
 *         cw_super.write(s, 0, s.length())
 *     }
 * }
 * var cw_super = Java.super(cw)
 * </pre>
 * @param self the {@code Java} object itself - not used.
 * @param adapter the original Java adapter instance for which the super adapter is created.
 * @return a super adapter for the original adapter
 */
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR, name="super")
public static Object _super(final Object self, final Object adapter) {
    return Bootstrap.createSuperAdapter(adapter);
}