Package org.rococoa

Examples of org.rococoa.RococoaException


            method.setAccessible(true); // needed if implementation is an anonymous subclass of Object
            Object result  = method.invoke(o, marshalledArgs);
            putResultIntoInvocation(invocation, typeToReturnToObjC, result);
        } catch (InvocationTargetException e) {
            logging.error("Exception calling method for selector " + selectorName, e);
            throw new RococoaException("Exception calling method for selector " + selectorName, e.getCause());
        } catch (Exception e) {
            logging.error("Exception calling method for selector " + selectorName, e);
            throw new RococoaException("Exception calling method for selector " + selectorName, e);
        }
    }
View Full Code Here


            // on i386 structs with sizeof exactly equal to 1, 2, 4, or 8 return in registers
            Structure prototype = (Structure) returnTypeForThisCall.newInstance();
            return prototype.size() < stretCutoff ? objc_msgSend_Pair : objc_msgSend_stret_Pair;
        }
        catch(InstantiationException e) {
            throw new RococoaException(e);
        }
        catch(IllegalAccessException e) {
            throw new RococoaException(e);
        }
    }
View Full Code Here

            throw (Error) t;
        }
        if (t instanceof RuntimeException) {
            throw (RuntimeException) t;
        }
        throw new RococoaException(t);
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    private <T> T newInstance(Class<?> clas) {
        try {
            return (T) clas.newInstance();
        } catch (Exception e) {
            throw new RococoaException("Could not instantiate " + clas,  e);
        }
    }
View Full Code Here

            // on i386 structs with sizeof exactly equal to 1, 2, 4, or 8 return in registers
            Structure prototype = (Structure) returnTypeForThisCall.newInstance();
            return prototype.size() < stretCutoff ? objc_msgSend_Pair : objc_msgSend_stret_Pair;
        }
        catch(InstantiationException e) {
            throw new RococoaException(e);
        }
        catch(IllegalAccessException e) {
            throw new RococoaException(e);
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    private <T> T newInstance(Class<?> clas) {
        try {
            return (T) clas.newInstance();
        } catch (Exception e) {
            throw new RococoaException("Could not instantiate " + clas,  e);
        }
    }
View Full Code Here

            method.setAccessible(true); // needed if implementation is an anonymous subclass of Object
            Object result  = method.invoke(o, marshalledArgs);
            putResultIntoInvocation(invocation, typeToReturnToObjC, result);
        } catch (InvocationTargetException e) {
            logging.error("Exception calling method for selector " + selectorName, e);
            throw new RococoaException("Exception calling method for selector " + selectorName, e.getCause());
        } catch (Exception e) {
            logging.error("Exception calling method for selector " + selectorName, e);
            throw new RococoaException("Exception calling method for selector " + selectorName, e);
        }
    }
View Full Code Here

    }

    private String stringForType(Class<?> clas) {
        NSInvocationMapper result = NSInvocationMapperLookup.mapperForType(clas);
        if (result == null)
            throw new RococoaException("Unable to give Objective-C type string for Java type " + clas);
        return result.typeString();
    }
View Full Code Here

            return;
        if (t instanceof Error)
            throw (Error) t;
        if (t instanceof RuntimeException)
            throw (RuntimeException) t;
        throw new RococoaException(t);
    }
View Full Code Here

TOP

Related Classes of org.rococoa.RococoaException

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.