Examples of MethodSignature


Examples of ch.epfl.labos.iu.orm.queryll2.symbolic.MethodSignature

      return sql;
   }

   @Override public SQLColumnValues staticMethodCallValue(MethodCallValue.StaticMethodCallValue val, T in) throws TypedValueVisitorException
   {
      MethodSignature sig = val.getSignature();
      if (entityInfo.passThroughStaticMethods.contains(sig))
      {
         SQLColumnValues base = val.args.get(0).visit(this, in);
         return base;
      }
View Full Code Here

Examples of com.intellij.psi.util.MethodSignature

  private static void addJavaMethods(PsiElement[] psiElements, Collection<Object> variants, boolean withoutDot) {
    final HashMap<MethodSignature, HashSet<PsiMethod>> sig2Methods = collectAvailableMethods(psiElements);

    for (Map.Entry<MethodSignature, HashSet<PsiMethod>> entry : sig2Methods.entrySet()) {
      final MethodSignature sig = entry.getKey();
      final String name = sig.getName();

      final StringBuffer buffer = new StringBuffer();
      buffer.append(name).append("(");
      buffer.append(StringUtil.join(ContainerUtil.map2Array(sig.getParameterTypes(), String.class, new Function<PsiType, String>() {
        public String fun(PsiType psiType) {
          return psiType.getPresentableText();
        }
      }), ", ")
      ).append(")");
View Full Code Here

Examples of de.dfki.util.xmlrpc.common.MethodSignature

        if( method.getDeclaringClass() == Object.class )
        {
            throw new XmlRpcException( 0, "Can't call methods defined in java.lang.Object" );
        }
       
        MethodSignature methodSig = MethodSignature.createFromMethod( method );
        Object[] adaptedParameters = adaptParameters( methodSig, args );
       
       
        Object result = method.invoke( delegate, adaptedParameters );
       
        //convert result back to a XML-RPC compliant representation
        result = getTypeConverter().convertToXmlRpcRepresentation( methodSig.getReturnParameter(), result );
       
        if (result == null && !methodSig.getReturnParameter().getApiRepresentationClass().equals( void.class ))
        {
            throw( new XmlRpcException( 0, "Method '" + method + "' must not return <null>" ) );
        }
       
        return( result );
View Full Code Here

Examples of de.dfki.util.xmlrpc.common.MethodSignature

    }

   
    public MethodCall prepareCall( MethodSignature sig )
    {
        final MethodSignature tmpSig = new MethodSignature( getHandlerName(), sig );
        return( new MethodCall( tmpSig ) );
    }
View Full Code Here

Examples of de.dfki.util.xmlrpc.common.MethodSignature

        {
            return( method.invoke( getClient(), args ) );
        }

        //we have a call on the api class: convert it into a XML-RPC call
        MethodSignature sig = MethodSignature.createFromMethod( method );
        MethodCall call = getClient().prepareCall( sig );
       
        if (args == null)
        {
            args = new Object[0];
View Full Code Here

Examples of net.sf.rej.java.attribute.generics.MethodSignature

          if (mdr.isClosing()) {
                sd.drawDefault("}");
            } else {
                Method m = mdr.getMethod();

                MethodSignature methodSig = null;
                boolean displayGenerics = SystemFacade.getInstance().getPreferences().isSettingTrue(Settings.DISPLAY_GENERICS);
                if (displayGenerics) {
                  SignatureAttribute signature = m.getAttributes().getSignatureAttribute();
                  if (signature != null) {
                    methodSig = Signatures.getMethodSignature(signature.getSignatureString());
                  }
                }

                String access = m.getAccessString();
                if (access.length() > 0) {
                    sd.drawKeyword(access + " ");
                }
               
                 if (methodSig != null) {
                   List<FormalTypeParameter> typeParams = methodSig.getFormalTypeParameters();
                     renderFormalTypeParameters(sd, ia, typeParams);
                   if (typeParams != null && typeParams.size() > 0) {
                     sd.drawKeyword(" ");
                   }
                }
               
                JavaType ret = m.getDescriptor().getReturn();
                if (methodSig == null) {
                  if (ret.isPrimitive()) {
                    sd.drawKeyword(ret.getType());
                  } else {
                    sd.drawDefault(ia.getShortName(ret.getType()));
                  }

                  sd.drawDefault(ret.getDimensions());
                } else {
                  renderGenericJavaType(sd, ia, methodSig.getReturnType());
                }
               
                sd.drawDefault(" ");

                if (m.isDeprecated()) {
                  sd.drawDefaultOverstrike(m.getName());
                } else {
                  sd.drawDefault(m.getName());
                }

                CodeAttribute ca = m.getAttributes().getCode();
                LocalVariableTableAttribute lvs = null;
                if (ca != null) {
                  lvs = ca.getAttributes().getLocalVariableTable();
                }

                int paramLVDefOffset = 0;
                if (!AccessFlags.isStatic(m.getAccessFlags())) {
                  paramLVDefOffset = 1;
                }

                sd.drawDefault("(");
                List<JavaType> params = m.getDescriptor().getParamList();
                List<GenericJavaType> genParams = null;
                if (methodSig != null) {
                  genParams = methodSig.getParameters();
                }
            boolean displayVarargs = SystemFacade.getInstance().getPreferences().isSettingTrue(Settings.DISPLAY_VARARGS);
            for (int i = 0; i < params.size(); i++) {
                    if (i > 0) {
                        sd.drawDefault(", ");
View Full Code Here

Examples of org.apache.axiom.om.MethodSignature

    public static TestSuite suite() {
        TestSuite suite = new TestSuite();
       
        // These methods are known to have the same behavior in Axiom and DOM:
        MethodSignature[] elementExceptions = new MethodSignature[] {
                new MethodSignature("getPrefix", new Class[0]),
                new MethodSignature("getNamespaceURI", new Class[0]),
                new MethodSignature("getLocalName", new Class[0]) };
       
        suite.addTest(new MethodCollisionTestCase(SOAPBody.class, Element.class, elementExceptions));
        suite.addTest(new MethodCollisionTestCase(SOAPEnvelope.class, Element.class, elementExceptions));
        suite.addTest(new MethodCollisionTestCase(SOAPFault.class, Element.class, elementExceptions));
        suite.addTest(new MethodCollisionTestCase(SOAPFaultCode.class, Element.class, elementExceptions));
        suite.addTest(new MethodCollisionTestCase(SOAPFaultDetail.class, Element.class, elementExceptions));
       
        // The getNodeValue and setNodeValue methods are real collisions that will be fixed in Axiom 1.3; see AXIOM-363
        suite.addTest(new MethodCollisionTestCase(SOAPFaultNode.class, Element.class, new MethodSignature[] {
                new MethodSignature("getPrefix", new Class[0]),
                new MethodSignature("getNamespaceURI", new Class[0]),
                new MethodSignature("getLocalName", new Class[0]),
                new MethodSignature("getNodeValue", new Class[0]),
                new MethodSignature("setNodeValue", new Class[] { String.class }) }));
       
        suite.addTest(new MethodCollisionTestCase(SOAPFaultReason.class, Element.class, elementExceptions));
        suite.addTest(new MethodCollisionTestCase(SOAPFaultRole.class, Element.class, elementExceptions));
        suite.addTest(new MethodCollisionTestCase(SOAPFaultSubCode.class, Element.class, elementExceptions));
        suite.addTest(new MethodCollisionTestCase(SOAPFaultText.class, Element.class, elementExceptions));
View Full Code Here

Examples of org.apache.clerezza.triaxrs.util.MethodSignature

  }
 
  public static void main(String arg[]){
    Class<?>[] myarray = {String.class};
    Class<?>[] myarray2 = {Integer.class};
    MethodSignature ms1 = new MethodSignature("test", myarray);
    MethodSignature ms2 = new MethodSignature("test", myarray2);
   
    if (ms1.equals(ms2)){
      System.out.println("True");
    }
   
View Full Code Here

Examples of org.apache.commons.proxy.factory.util.MethodSignature

public class TestMethodSignature extends TestCase
{
    public void testEquals() throws Exception
    {
        final MethodSignature sig = new MethodSignature( Echo.class.getMethod( "echoBack"new Class[] { String.class } ) );
        assertTrue( sig.equals( sig ) );
        assertFalse( sig.equals( "echoBack" ) );
        assertEquals( sig, new MethodSignature( Echo.class.getMethod( "echoBack"new Class[] { String.class } ) ) );
        assertEquals( sig, new MethodSignature( DuplicateEcho.class.getMethod( "echoBack"new Class[] { String.class } ) ) );
        assertFalse( sig.equals( new MethodSignature( Echo.class.getMethod( "echoBack"new Class[] { String.class, String.class } ) ) ) );
        assertFalse( sig.equals( new MethodSignature( Echo.class.getMethod( "echo"new Class[] {} ) ) ) );
    }
View Full Code Here

Examples of org.apache.hivemind.service.MethodSignature

        classFab.addField("_inner", serviceInterface);
        classFab.addField("_shutdown", boolean.class);

        classFab.addInterface(RegistryShutdownListener.class);

        classFab.addMethod(Modifier.PUBLIC | Modifier.FINAL, new MethodSignature(void.class,
                "registryDidShutdown", null, null), "{ _shutdown = true; }");

        classFab.addMethod(
                Modifier.PUBLIC | Modifier.SYNCHRONIZED | Modifier.FINAL,
                new MethodSignature(void.class, "_setInner", new Class[]
                { serviceInterface }, null),
                "{ _inner = $1; }");

        BodyBuilder builder = new BodyBuilder();
        builder.begin();
        builder.addln("if (_shutdown)");
        builder.begin();
        builder.addln("_inner = null;");
        builder.addln("throw org.apache.hivemind.HiveMind#createRegistryShutdownException();");
        builder.end();

        builder.addln("return _inner;");
        builder.end();

        classFab.addMethod(Modifier.PRIVATE, new MethodSignature(serviceInterface, "_getInner",
                null, null), builder.toString());

        proxyBuilder.addServiceMethods("_getInner()");

        return classFab.createClass();
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.