Examples of JavaObject


Examples of org.hsqldb.types.JavaObject

                        /**
                         * @todo fredt - we need this for script processing only
                         *  handle the script separately and allow normal Sting
                         *  objects to be stored as JavaObject
                         */
                        return new JavaObject(
                            StringConverter.hexToByte((String) o));
                    } else if (o instanceof Binary) {
                        return new JavaObject(((Binary) o).getBytes());
                    }

                    return new JavaObject((Serializable) o);

                default :
            }

            if (o instanceof JavaObject) {
View Full Code Here

Examples of org.hsqldb.types.JavaObject

    {
      long l;
      switch (i)
      {
      case 1111:
        paramObject = new JavaObject((Serializable)paramObject);
        break;
      case -4:
      case -3:
      case -2:
        if (!(paramObject instanceof byte[]))
View Full Code Here

Examples of org.hsqldb.types.JavaObject

        throw Trace.error(95, Types.getTypeString(paramInt));
      case 1111:
        if ((paramObject instanceof JavaObject))
          return paramObject;
        if ((paramObject instanceof String))
          return new JavaObject(StringConverter.hexToByte((String)paramObject));
        if ((paramObject instanceof Binary))
          return new JavaObject(((Binary)paramObject).getBytes());
        return new JavaObject((Serializable)paramObject);
      }
      if ((paramObject instanceof JavaObject))
      {
        paramObject = ((JavaObject)paramObject).getObject();
        return convertObject(paramObject, paramInt);
View Full Code Here

Examples of org.hsqldb.types.JavaObject

      return null;
    str = str.trim();
    if (str.length() == 0)
      return null;
    byte[] arrayOfByte = Column.hexToByteArray(str);
    return new JavaObject(arrayOfByte);
  }
View Full Code Here

Examples of org.jruby.javasupport.JavaObject

        if (target == void.class) return null;

        if (dataGetStruct() instanceof JavaObject) {
            // for interface impls

            JavaObject innerWrapper = (JavaObject)dataGetStruct();

            // ensure the object is associated with the wrapper we found it in,
            // so that if it comes back we don't re-wrap it
            if (target.isAssignableFrom(innerWrapper.getValue().getClass())) {
                getRuntime().getJavaSupport().getObjectProxyCache().put(innerWrapper.getValue(), this);

                return innerWrapper.getValue();
            }
        } else if (JavaUtil.isDuckTypeConvertable(getClass(), target)) {
            if (!respondsTo("java_object")) {
                return JavaUtil.convertProcToInterface(getRuntime().getCurrentContext(), this, target);
            }
View Full Code Here

Examples of org.jruby.javasupport.JavaObject

        if (target == void.class) return null;

        if (dataGetStruct() instanceof JavaObject) {
            // for interface impls

            JavaObject innerWrapper = (JavaObject)dataGetStruct();

            // ensure the object is associated with the wrapper we found it in,
            // so that if it comes back we don't re-wrap it
            if (target.isAssignableFrom(innerWrapper.getValue().getClass())) {
                getRuntime().getJavaSupport().getObjectProxyCache().put(innerWrapper.getValue(), this);

                return innerWrapper.getValue();
            }
        } else if (JavaUtil.isDuckTypeConvertable(getClass(), target)) {
            if (!respondsTo("java_object")) {
                return JavaUtil.convertProcToInterface(getRuntime().getCurrentContext(), this, target);
            }
View Full Code Here

Examples of org.jruby.javasupport.JavaObject

        if (target == void.class) return null;

        if (dataGetStruct() instanceof JavaObject) {
            // for interface impls

            JavaObject innerWrapper = (JavaObject)dataGetStruct();

            // ensure the object is associated with the wrapper we found it in,
            // so that if it comes back we don't re-wrap it
            if (target.isAssignableFrom(innerWrapper.getValue().getClass())) {
                getRuntime().getJavaSupport().getObjectProxyCache().put(innerWrapper.getValue(), this);

                return innerWrapper.getValue();
            }
        } else if (JavaUtil.isDuckTypeConvertable(getClass(), target)) {
            if (!respondsTo("java_object")) {
                return JavaUtil.convertProcToInterface(getRuntime().getCurrentContext(), this, target);
            }
View Full Code Here

Examples of railo.runtime.java.JavaObject

        MethodInstance mi=getMethodInstanceEL(obj,clazz, KeyImpl.getInstance(methodName), args);
        if(mi!=null) return mi;
       
        Class[] classes = getClasses(args);
        //StringBuilder sb=null;
        JavaObject jo;
        Class c;
        ConstructorInstance ci;
        for(int i=0;i<classes.length;i++){
          if(args[i] instanceof JavaObject) {
            jo=(JavaObject) args[i];
            c=jo.getClazz();
            ci = Reflector.getConstructorInstance(c, new Object[0], null);
            if(ci==null) {
             
            throw new NoSuchMethodException("The "+pos(i+1)+" parameter of "+methodName+"("+getDspMethods(classes)+") ia a object created " +
                "by the createObject function (JavaObject/JavaProxy). This object has not been instantiated because it does not have a constructor " +
View Full Code Here

Examples of railo.runtime.java.JavaObject

        else if(o instanceof ObjectWrap) {
          if(o instanceof JavaObject ) {
            Struct sct = toStruct(((JavaObject)o).getEmbededObject(null),null,caseSensitive);
              if(sct!=null) return sct;
           
            JavaObject jo = (JavaObject)o;
            return new ObjectStruct(jo);
          }
            return toStruct(((ObjectWrap)o).getEmbededObject(),caseSensitive);
        }
        if(Decision.isSimpleValue(o) || Decision.isArray(o))
View Full Code Here

Examples of railo.runtime.java.JavaObject

  }

  public static Objects toObjects(PageContext pc,Object obj) throws PageException {
    if(obj instanceof Objects) return (Objects) obj;
    if(obj instanceof ObjectWrap) return toObjects(pc,((ObjectWrap)obj).getEmbededObject());
    return new JavaObject(pc.getVariableUtil(), obj);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.