Examples of dataGetStruct()


Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

    @Deprecated
    public static JavaObject unwrapJavaObject(Ruby runtime, IRubyObject convertee, String errorMessage) {
        IRubyObject obj = convertee;
        if(!(obj instanceof JavaObject)) {
            if (obj.dataGetStruct() != null && (obj.dataGetStruct() instanceof JavaObject)) {
                obj = (JavaObject)obj.dataGetStruct();
            } else {
                throw runtime.newTypeError(errorMessage);
            }
        }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

    @Deprecated
    public static JavaObject unwrapJavaObject(Ruby runtime, IRubyObject convertee, String errorMessage) {
        IRubyObject obj = convertee;
        if(!(obj instanceof JavaObject)) {
            if (obj.dataGetStruct() != null && (obj.dataGetStruct() instanceof JavaObject)) {
                obj = (JavaObject)obj.dataGetStruct();
            } else {
                throw runtime.newTypeError(errorMessage);
            }
        }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

    @Deprecated
    public static JavaObject unwrapJavaObject(Ruby runtime, IRubyObject convertee, String errorMessage) {
        IRubyObject obj = convertee;
        if(!(obj instanceof JavaObject)) {
            if (obj.dataGetStruct() != null && (obj.dataGetStruct() instanceof JavaObject)) {
                obj = (JavaObject)obj.dataGetStruct();
            } else {
                throw runtime.newTypeError(errorMessage);
            }
        }
        return (JavaObject)obj;
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

        Object javaObject = null;
        if (!Modifier.isStatic(field.getModifiers())) {
            javaObject  = JavaUtil.unwrapJavaValue(getRuntime(), object, "not a java object: " + object);
        }
        IRubyObject val = value;
        if(val.dataGetStruct() instanceof JavaObject) {
            val = (IRubyObject)val.dataGetStruct();
        }
        try {
            Object convertedValue = val.toJava(field.getType());
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

        if (!Modifier.isStatic(field.getModifiers())) {
            javaObject  = JavaUtil.unwrapJavaValue(getRuntime(), object, "not a java object: " + object);
        }
        IRubyObject val = value;
        if(val.dataGetStruct() instanceof JavaObject) {
            val = (IRubyObject)val.dataGetStruct();
        }
        try {
            Object convertedValue = val.toJava(field.getType());

            field.set(javaObject, convertedValue);
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

    @Deprecated
    public static JavaObject unwrapJavaObject(Ruby runtime, IRubyObject convertee, String errorMessage) {
        IRubyObject obj = convertee;
        if(!(obj instanceof JavaObject)) {
            if (obj.dataGetStruct() != null && (obj.dataGetStruct() instanceof JavaObject)) {
                obj = (JavaObject)obj.dataGetStruct();
            } else {
                throw runtime.newTypeError(errorMessage);
            }
        }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

    @Deprecated
    public static JavaObject unwrapJavaObject(Ruby runtime, IRubyObject convertee, String errorMessage) {
        IRubyObject obj = convertee;
        if(!(obj instanceof JavaObject)) {
            if (obj.dataGetStruct() != null && (obj.dataGetStruct() instanceof JavaObject)) {
                obj = (JavaObject)obj.dataGetStruct();
            } else {
                throw runtime.newTypeError(errorMessage);
            }
        }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

    @Deprecated
    public static JavaObject unwrapJavaObject(Ruby runtime, IRubyObject convertee, String errorMessage) {
        IRubyObject obj = convertee;
        if(!(obj instanceof JavaObject)) {
            if (obj.dataGetStruct() != null && (obj.dataGetStruct() instanceof JavaObject)) {
                obj = (JavaObject)obj.dataGetStruct();
            } else {
                throw runtime.newTypeError(errorMessage);
            }
        }
        return (JavaObject)obj;
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

        Object javaObject = null;
        if (!Modifier.isStatic(field.getModifiers())) {
            javaObject  = JavaUtil.unwrapJavaValue(getRuntime(), object, "not a java object: " + object);
        }
        IRubyObject val = value;
        if(val.dataGetStruct() instanceof JavaObject) {
            val = (IRubyObject)val.dataGetStruct();
        }
        try {
            Object convertedValue = val.toJava(field.getType());
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.dataGetStruct()

        if (!Modifier.isStatic(field.getModifiers())) {
            javaObject  = JavaUtil.unwrapJavaValue(getRuntime(), object, "not a java object: " + object);
        }
        IRubyObject val = value;
        if(val.dataGetStruct() instanceof JavaObject) {
            val = (IRubyObject)val.dataGetStruct();
        }
        try {
            Object convertedValue = val.toJava(field.getType());

            field.set(javaObject, convertedValue);
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.