Examples of findMethod()


Examples of com.google.gwt.core.ext.typeinfo.JClassType.findMethod()

    JClassType asClass = type.isClassOrInterface();
    if (asClass == null) {
      return null;
    }

    JMethod m = asClass.findMethod(JSFlyweightWrapperGenerator.CREATE_PEER,
        new JType[] {oracle.findType(JavaScriptObject.class.getName())});

    if (m == null || !m.isStatic() || !type.equals(m.getReturnType())) {
      return null;
    }
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.findMethod()

      generateCloneFields(beanType.getSuperclass());
      JField[] fields = beanType.getFields();
      for(JField field : fields) {
        JClassType targetType = beanType;
        String capFieldName = capitalize(field.getName());
        JMethod getter = targetType.findMethod("get"+capFieldName, new JType[0]);
        if(getter == null) getter = targetType.findMethod("is"+capFieldName, new JType[0]);
        JType type = field.getType();
        JMethod setter = targetType.findMethod("set"+capFieldName, new JType[]{type});
        if(getter != null && setter != null) {
          String copyValue = "src."+getter.getName()+"()";
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.findMethod()

      JField[] fields = beanType.getFields();
      for(JField field : fields) {
        JClassType targetType = beanType;
        String capFieldName = capitalize(field.getName());
        JMethod getter = targetType.findMethod("get"+capFieldName, new JType[0]);
        if(getter == null) getter = targetType.findMethod("is"+capFieldName, new JType[0]);
        JType type = field.getType();
        JMethod setter = targetType.findMethod("set"+capFieldName, new JType[]{type});
        if(getter != null && setter != null) {
          String copyValue = "src."+getter.getName()+"()";
         
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.findMethod()

        JClassType targetType = beanType;
        String capFieldName = capitalize(field.getName());
        JMethod getter = targetType.findMethod("get"+capFieldName, new JType[0]);
        if(getter == null) getter = targetType.findMethod("is"+capFieldName, new JType[0]);
        JType type = field.getType();
        JMethod setter = targetType.findMethod("set"+capFieldName, new JType[]{type});
        if(getter != null && setter != null) {
          String copyValue = "src."+getter.getName()+"()";
         
          copyValue = copyField(type, copyValue, capFieldName);
          sw.println("dest.set"+capFieldName+"("+copyValue+");");
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.findMethod()

      generateGetDifferences(beanType.getSuperclass(), firstObject, secondObject);
      JField[] fields = beanType.getFields();
      for(JField field : fields) {
        JClassType targetType = beanType;
        String capFieldName = capitalize(field.getName());
        JMethod getter = targetType.findMethod("get"+capFieldName, new JType[0]);
        if(getter == null) getter = targetType.findMethod("is"+capFieldName, new JType[0]);
        JType type = field.getType();
        if(getter != null) {
          String firstValue = firstObject+"."+getter.getName()+"()";
          String secondValue = secondObject+"."+getter.getName()+"()";
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.findMethod()

      JField[] fields = beanType.getFields();
      for(JField field : fields) {
        JClassType targetType = beanType;
        String capFieldName = capitalize(field.getName());
        JMethod getter = targetType.findMethod("get"+capFieldName, new JType[0]);
        if(getter == null) getter = targetType.findMethod("is"+capFieldName, new JType[0]);
        JType type = field.getType();
        if(getter != null) {
          String firstValue = firstObject+"."+getter.getName()+"()";
          String secondValue = secondObject+"."+getter.getName()+"()";
          generateCompareValue(field.getName(), type, firstValue,
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.findMethod()

      }
     
      // Deep copy objects
      JClassType cls = type.isClassOrInterface();
      if(cls != null) {
          if(cls.findMethod("clone", new JType[0]) != null) {
            copyValue = "("+cls.getParameterizedQualifiedSourceName()+") "+copyValue;
          } else {
            beanTypes.add(cls);
            copyValue = "clone("+copyValue+")";
          }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JDeclaredType.findMethod()

          throw new UnableToCompleteException();
        }
        JMethod onModuleLoadMethod =
            entryPointType.findMethod("onModuleLoad()V", true);
        JMethod specificOnModuleLoadMethod =
            specificEntryPointType.findMethod("onModuleLoad()V", true);

        if (specificOnModuleLoadMethod != null && specificOnModuleLoadMethod.isStatic()) {
          // Synthesize a static invocation FooEntryPoint.onModuleLoad(); call.
          JMethodCall staticOnModuleLoadCall =
              new JMethodCall(origin, null, specificOnModuleLoadMethod);
View Full Code Here

Examples of com.gwtent.reflection.client.ClassType.findMethod()

      if (field == null)
        pathNotFound(path, fullPath);
     
      object = field.getFieldValue(instance);
    }else{
      Method method = parent.findMethod(path, new String[0]);
      if (method == null)
        pathNotFound(path, fullPath);
     
      object = method.invoke(instance, null);
    }
View Full Code Here

Examples of com.linkedin.restli.internal.server.model.ResourceModel.findMethod()

                                mockRegistry,
                                Arrays.asList(mockFilter, mockFilter));
    Map<String, ResourceModel> resourceModelMap =
        buildResourceModels(StatusCollectionResource.class, LocationResource.class, DiscoveredItemsResource.class);
    ResourceModel statusResourceModel = resourceModelMap.get("/statuses");
    ResourceMethodDescriptor resourceMethodDescriptor = statusResourceModel.findMethod(ResourceMethod.GET);
    final StatusCollectionResource resource = getMockResource(StatusCollectionResource.class);
    RestRequestBuilder builder =
        new RestRequestBuilder(new URI("/statuses/1")).setMethod("GET")
                                                      .addHeaderValue("Accept", "application/json")
                                                      .setHeader(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION,
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.