Package org.jboss.errai.codegen.framework.meta.impl.build

Examples of org.jboss.errai.codegen.framework.meta.impl.build.BuildMetaField


    }

    buildMetaClass.setParameterizedType(parameterizedType);

    for (MetaField field : clazz.getFields()) {
      buildMetaClass.addField(new BuildMetaField(buildMetaClass, EmptyStatement.INSTANCE,
              GenUtil.scopeOf(field), field.getType(), field.getName()));
    }

    for (MetaConstructor c : clazz.getConstructors()) {
      BuildMetaConstructor newConstructor = new BuildMetaConstructor(buildMetaClass, EmptyStatement.INSTANCE,
View Full Code Here


  private FieldBuildStart<T> genField(final Scope scope, final String name,
                                            final MetaClass type) {
    return new FieldBuilder<T>(new BuildCallback<T>() {
      @Override
      public T callback(final Statement statement) {
        BuildMetaField buildMetaField
                = new BuildMetaField(classDefinition, statement, scope, type, name);

        classDefinition.addField(buildMetaField);
        return (T) ClassBuilder.this;
      }
View Full Code Here

  @Override
  public void handleCall(final CallWriter writer, final Context context, Statement statement) {
    final MetaField field;
    if (fieldName.equals("this")) {
      // TODO this is a workaround to access the enclosing instance of a type
      field = new BuildMetaField(null, null, Scope.Private, statement.getType(), "this");
    }
    else {
      field = statement.getType().getField(fieldName);
    }
View Full Code Here

  private FieldBuildInitializer<T> genField(final Scope scope, final String name,
                                                                    final MetaClass type) {
    return new FieldBuilder<T>(new BuildCallback<T>() {
      @Override
      public T callback(final Statement statement) {
        BuildMetaField buildMetaField
                = new BuildMetaField(classDefinition, statement, scope, type, name);

        classDefinition.addField(buildMetaField);
        return (T) ClassBuilder.this;
      }
    }, scope, type, name);
View Full Code Here

  private FieldBuildStart<T> genField(final Scope scope, final String name,
                                            final MetaClass type) {
    return new FieldBuilder<T>(new BuildCallback<T>() {
      @Override
      public T callback(final Statement statement) {
        BuildMetaField buildMetaField
                = new BuildMetaField(classDefinition, statement, scope, type, name);

        classDefinition.addField(buildMetaField);
        return (T) ClassBuilder.this;
      }
View Full Code Here

  @Override
  public void handleCall(final CallWriter writer, final Context context, Statement statement) {
    final MetaField field;
    if (fieldName.equals("this")) {
      // TODO this is a workaround to access the enclosing instance of a type
      field = new BuildMetaField(null, null, Scope.Private, statement.getType(), "this");
    }
    else {
      field = statement.getType().getDeclaredField(fieldName);
    }
View Full Code Here

    else {
      buildMetaClass.setParameterizedType(clazz.getParameterizedType());
    }

    for (MetaField field : clazz.getDeclaredFields()) {
      BuildMetaField bmf = new ShadowBuildMetaField(buildMetaClass, EmptyStatement.INSTANCE,
              GenUtil.scopeOf(field), field.getType(), field.getName(), field);

      bmf.setFinal(field.isFinal());
      bmf.setStatic(field.isStatic());
      bmf.setVolatile(field.isVolatile());
      bmf.setTransient(field.isTransient());

      buildMetaClass.addField(bmf);
    }

    for (MetaConstructor c : clazz.getDeclaredConstructors()) {
View Full Code Here

TOP

Related Classes of org.jboss.errai.codegen.framework.meta.impl.build.BuildMetaField

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.