Package com.google.gwt.dev.shell

Examples of com.google.gwt.dev.shell.CompilingClassLoader


   * @return the return value as a Object.
   */
  @Override
  protected JsValue doInvoke(String name, Object jthis, Class<?>[] types,
      Object[] args) {
    CompilingClassLoader isolatedClassLoader = getIsolatedClassLoader();

    JsValueMoz32/*64*/ jsthis = new JsValueMoz32/*64*/();
    Class<?> jthisType = (jthis == null) ? Object.class : jthis.getClass();
    JsValueGlue.set(jsthis, isolatedClassLoader, jthisType, jthis);

View Full Code Here


    // callback from delegate: pass to super, it will go with our class loader
    return super.rebindAndCreate(requestedClassName);
  }

  public DispatchIdOracle getDispatchIdOracle() throws Exception {
    CompilingClassLoader classLoader = getIsolatedClassLoader();
    return classLoader;
  }
View Full Code Here

   */
  protected JsValue doInvoke(String name, Object jthis, Class[] types,
      Object[] args) {

    JsValueMoz jsthis = JsValueMoz.createUndefinedValue(window);
    CompilingClassLoader isolatedClassLoader = getIsolatedClassLoader();
    jsthis.setWrappedJavaObject(isolatedClassLoader, jthis);

    int argc = args.length;
    JsValueMoz argv[] = new JsValueMoz[argc];
    int[] jsArgsInt = new int[argc];
View Full Code Here

   * @return the return value as a Object.
   */
  @Override
  protected JsValue doInvoke(String name, Object jthis, Class<?>[] types,
      Object[] args) {
    CompilingClassLoader isolatedClassLoader = getIsolatedClassLoader();

    JsValueSaf jsValueThis = new JsValueSaf();
    Class<?> jthisType = (jthis == null) ? Object.class : jthis.getClass();
    JsValueGlue.set(jsValueThis, isolatedClassLoader, jthisType, jthis);
    int jsthis = jsValueThis.getJsValue();
View Full Code Here

   * @return the return value as a Object.
   */
  @Override
  protected JsValue doInvoke(String name, Object jthis, Class<?>[] types,
      Object[] args) {
    CompilingClassLoader isolatedClassLoader = getIsolatedClassLoader();

    JsValueMoz jsthis = new JsValueMoz();
    Class<?> jthisType = (jthis == null) ? Object.class : jthis.getClass();
    JsValueGlue.set(jsthis, isolatedClassLoader, jthisType, jthis);

View Full Code Here

   */
  @Override
  protected JsValue doInvoke(String name, Object jthis, Class<?>[] types, Object[] args) {
  try {
    m_staticContext.push(name);
    CompilingClassLoader isolatedClassLoader = getIsolatedClassLoader();
    JsValueSaf jsValueThis = new JsValueSaf();
    Class<?> jthisType = jthis == null ? Object.class : jthis.getClass();
    JsValueGlue.set(jsValueThis, isolatedClassLoader, jthisType, jthis);
    long jsthis = jsValueThis.getJsValue();
    int argc = args.length;
View Full Code Here

  @Override
  protected JsValue doInvoke(String name, Object jthis, Class<?>[] types,
      Object[] args) throws Throwable {
    Variant[] vArgs = null;
    try {
      CompilingClassLoader isolatedClassLoader = getIsolatedClassLoader();

      // Build the argument list, including 'jthis'.
      //
      int len = args.length;
      vArgs = new Variant[len + 1];
View Full Code Here

   * @return the return value as a Object.
   */
  @Override
  protected JsValue doInvoke(String name, Object jthis, Class<?>[] types,
      Object[] args) {
    CompilingClassLoader isolatedClassLoader = getIsolatedClassLoader();

    JsValueMoz64 jsthis = new JsValueMoz64();
    Class<?> jthisType = (jthis == null) ? Object.class : jthis.getClass();
    JsValueGlue.set(jsthis, isolatedClassLoader, jthisType, jthis);

View Full Code Here

    this.classLoaderRef = new WeakReference<CompilingClassLoader>(cl);
  }

  public H getField(H jsContext, String name) {
    LowLevelWebKit.pushJsContext(jsContext);
    CompilingClassLoader classLoader = classLoaderRef.get();
    if (classLoader == null) {
      throw new RuntimeException("Invalid class loader.");
    }
    try {
      int dispId = getDispId(name);
      if (dispId < 0) {
        return LowLevelWebKit.getJsUndefined(jsContext);
      }
      if (javaDispatch.isField(dispId)) {
        Field field = javaDispatch.getField(dispId);
        JsValueWebKit<H> jsValue = new JsValueWebKit<H>();
        JsValueGlue.set(jsValue, classLoader, field.getType(), javaDispatch.getFieldValue(dispId));
        H jsval = jsValue.getJsValue();
        // Native code will eat an extra ref.
        LowLevelWebKit.gcProtect(jsContext, jsval);
        return jsval;
      } else {
        MethodAdaptor method = javaDispatch.getMethod(dispId);
        AccessibleObject obj = method.getUnderlyingObject();
        DispatchMethod<?> dispMethod = (DispatchMethod<?>) classLoader.getWrapperForObject(obj);
        if (dispMethod == null) {
          dispMethod = new MethodDispatch<H>(classLoader, method);
          classLoader.putWrapperForObject(obj, dispMethod);
        }
        // Native code eats the same ref it gave us.
        return LowLevelWebKit.wrapDispatchMethod(jsContext, method.toString(), dispMethod);
      }
    } finally {
View Full Code Here

  public Object getTarget() {
    return javaDispatch.getTarget();
  }

  public void setField(H jsContext, String name, H value) {
    CompilingClassLoader classLoader = classLoaderRef.get();
    if (classLoader == null) {
      throw new RuntimeException("Invalid class loader.");
    }
    LowLevelWebKit.pushJsContext(jsContext);
    try {
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.shell.CompilingClassLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.