Package ca.weblite.objc.annotations

Examples of ca.weblite.objc.annotations.Msg


        if ( mm == null ){
            mm = new HashMap<String,Method>();
            Method[] methods = cls.getMethods();
            for ( int i=0; i<methods.length; i++){
                Method method = methods[i];
                Msg message = (Msg)method.getAnnotation(Msg.class);
                if ( message != null){
                    mm.put(message.selector(), method);
                   
                }
            }
            methodMap.put(cls, mm);
        }
View Full Code Here


    public long methodSignatureForSelector(long lselector) {
       
        Pointer selector = new Pointer(lselector);
        Method method = methodForSelector(selName(selector));
        if ( method != null){
            Msg message = (Msg)method.getAnnotation(Msg.class);
            if ( !"".equals(message.signature()) ){
                long res =  PointerTool.getPeer(
                        msgPointer(cls("NSMethodSignature"), "signatureWithObjCTypes:", message.signature())
                );
                return res;
            } else if ( !"".equals(message.like())){
                String[] parts = message.like().split("\\.");
                Proxy instance = client.chain(parts[0], "alloc").chain("init");
                Pointer out = msgPointer(instance.getPeer(), "methodSignatureForSelector:", sel(parts[1]));
                return PointerTool.getPeer(out);
            }
           
View Full Code Here

        long numArgs = (Long)pSig.send("numberOfArguments");
       
        Method method = methodForSelector(selName(selector));
        if ( method != null){
           
            Msg message = (Msg)method.getAnnotation(Msg.class);
            if ( true ||  !"".equals(message.signature()) ){
                // Perform the method and provide the correct output for the invocation
              

                Object[] args = new Object[new Long(numArgs).intValue()-2];
                for ( int i=2; i<numArgs; i++){
View Full Code Here

TOP

Related Classes of ca.weblite.objc.annotations.Msg

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.