Package rocket.generator.rebind.methodparameter

Examples of rocket.generator.rebind.methodparameter.NewMethodParameter


    setter.setNative(false);
    setter.setReturnType(this.getGeneratorContext().getVoid());
    setter.setStatic(false);
    setter.setVisibility(Visibility.PROTECTED);

    final NewMethodParameter setterParameter = setter.newParameter();
    setterParameter.setFinal(true);
    setterParameter.setName(Constants.IMAGE_FACTORY_SETTER_PARAMETER_NAME);
    setterParameter.setType(imageFactory);
  }
View Full Code Here


    final InvokeMethodTemplatedFile body = new InvokeMethodTemplatedFile();
    body.setType(beanType);
    body.setMethod(destroyMethod);

    final NewMethodParameter instanceParameter = (NewMethodParameter) newMethod.getParameters().get(0);
    instanceParameter.setFinal(true);
    instanceParameter.setName(Constants.DESTROY_INSTANCE_PARAMETER);

    newMethod.setBody(body);
  }
View Full Code Here

    final NewMethod newMethod = method.copy(reader);
    newMethod.setNative(false);

    // rename parameters to the same names used in templates...
    final List<MethodParameter> newMethodParameters = (List<MethodParameter>) newMethod.getParameters();
    final NewMethodParameter object = (NewMethodParameter) newMethodParameters.get(0);
    object.setName(SerializationConstants.CLIENT_OBJECT_READER_IMPL_READ_INSTANCE_PARAMETER);
    object.setFinal(true);

    final NewMethodParameter objectInputStreamParameter = (NewMethodParameter) newMethodParameters.get(1);
    objectInputStreamParameter.setName(SerializationConstants.CLIENT_OBJECT_READER_IMPL_READ_OBJECT_INPUT_STREAM_PARAMETER);
    objectInputStreamParameter.setFinal(true);

    final ReadTemplatedFile body = new ReadTemplatedFile();
    body.setType(type);
    newMethod.setBody(body);
View Full Code Here

    newMethod.setReturnType(context.getVoid());
    newMethod.setStatic(false);
    newMethod.setVisibility(Visibility.PUBLIC);

    // rename parameters to the same names used in templates...
    final NewMethodParameter object = newMethod.newParameter();
    object.setName(SerializationConstants.CLIENT_OBJECT_READER_IMPL_READ_INSTANCE_PARAMETER);
    object.setFinal(true);
    object.setType(type);

    final NewMethodParameter objectInputStream = newMethod.newParameter();
    objectInputStream.setName(SerializationConstants.CLIENT_OBJECT_READER_IMPL_READ_FIELDS_OBJECT_INPUT_STREAM_PARAMETER);
    objectInputStream.setFinal(true);
    objectInputStream.setType(this.getObjectInputStream());

    final ReadFieldsTemplatedFile body = new ReadFieldsTemplatedFile();
    newMethod.setBody(body);
    body.setType(type);
View Full Code Here

    method.setNative(true);
    method.setReturnType(context.getVoid());
    method.setStatic(false);
    method.setVisibility(Visibility.PRIVATE);

    final NewMethodParameter instance = method.newParameter();
    instance.setFinal(true);
    instance.setName(SerializationConstants.CLIENT_OBJECT_READER_IMPL_FIELD_SETTER_INSTANCE_PARAMETER);
    instance.setType(field.getEnclosingType());

    final NewMethodParameter value = method.newParameter();
    value.setFinal(true);
    value.setName(SerializationConstants.CLIENT_OBJECT_READER_IMPL_FIELD_SETTER_VALUE_PARAMETER);

    final Type fieldType = field.getType();
    value.setType(fieldType);

    if (fieldType.equals(context.getLong())) {
      method.addMetaData("com.google.gwt.core.client.UnsafeNativeLong", "");
    }
View Full Code Here

    final NewMethod newMethod = method.copy(writer);
    newMethod.setAbstract(false);

    // rename parameters to the same names used in templates...
    final List newMethodParameters = newMethod.getParameters();
    final NewMethodParameter object = (NewMethodParameter) newMethodParameters.get(0);
    object.setFinal(true);
    object.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_WRITE0_INSTANCE_PARAMETER);

    final NewMethodParameter objectOutputStream = (NewMethodParameter) newMethodParameters.get(1);
    objectOutputStream.setFinal(true);
    objectOutputStream.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_WRITE0_OBJECT_OUTPUT_STREAM_PARAMETER);

    final WriteArrayTemplatedFile body = new WriteArrayTemplatedFile();
    body.setType(type);
    newMethod.setBody(body);
View Full Code Here

    final NewMethod newMethod = method.copy(writer);
    newMethod.setAbstract(false);

    // rename parameters to the same names used in templates...
    final List<MethodParameter> newMethodParameters = newMethod.getParameters();
    final NewMethodParameter object = (NewMethodParameter) newMethodParameters.get(0);
    object.setFinal(true);
    object.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_WRITE0_INSTANCE_PARAMETER);

    final NewMethodParameter objectOutputStream = (NewMethodParameter) newMethodParameters.get(1);
    objectOutputStream.setFinal(true);
    objectOutputStream.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_WRITE0_OBJECT_OUTPUT_STREAM_PARAMETER);

    final WriteTemplatedFile body = new WriteTemplatedFile();
    body.setType(type);
    newMethod.setBody(body);
View Full Code Here

    newMethod.setNative(false);
    newMethod.setReturnType(context.getVoid());
    newMethod.setStatic(false);
    newMethod.setVisibility(Visibility.PUBLIC);

    final NewMethodParameter instance = newMethod.newParameter();
    instance.setFinal(true);
    instance.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_WRITE_FIELDS_INSTANCE_PARAMETER);
    instance.setType(type);

    final NewMethodParameter objectOutputStream = newMethod.newParameter();
    objectOutputStream.setFinal(true);
    objectOutputStream.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_WRITE_FIELDS_OBJECT_OUTPUT_STREAM_PARAMETER);
    objectOutputStream.setType(this.getObjectOutputStream());

    final WriteFieldsTemplatedFile body = new WriteFieldsTemplatedFile();
    body.setType(type);
    newMethod.setBody(body);
View Full Code Here

    if (fieldType.equals(context.getLong())) {
      method.addMetaData("com.google.gwt.core.client.UnsafeNativeLong", "");
    }
    // add a parameter
    final NewMethodParameter instance = method.newParameter();
    instance.setFinal(true);
    instance.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_FIELD_GETTER_INSTANCE_PARAMETER);
    instance.setType(field.getEnclosingType());

    context.debug(field.getName());
    return method;
  }
View Full Code Here

    builder.append('(');
    if (this.hasParameters()) {
      final Iterator<MethodParameter> parameters = this.getParameters().iterator();
      while (parameters.hasNext()) {
        final NewMethodParameter parameter = (NewMethodParameter)parameters.next();
        builder.append(parameter.getType());

        if (parameters.hasNext()) {
          builder.append(", ");
        }
      }
View Full Code Here

TOP

Related Classes of rocket.generator.rebind.methodparameter.NewMethodParameter

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.