Package org.jboss.errai.codegen

Examples of org.jboss.errai.codegen.Context


          public AnonymousClassStructureBuilder callback(final Statement statement) {

            addCallable(new DeferredGenerateCallback() {
              @Override
              public String doGenerate(final Context context) {
                final Context subContext = Context.create(context);
                for (final Parameter parm : parameters.getParameters()) {
                  subContext.addVariable(Variable.create(parm.getName(), parm.getType()));
                }

                final StringBuilder buf = new StringBuilder(256);
                final String returnType = getClassReference(method.getReturnType(), context);
View Full Code Here


    if (generatedCache != null) return generatedCache;
    try {
      if (deferredGenerateCallbacks == null)
        return null;

      final Context subContext = Context.create(context);

      for (final Variable v : classDefinition.getContext().getDeclaredVariables()) {
        subContext.addVariable(v);
      }

      subContext.addVariable(Variable.create("this", getClassDefinition()));

      classDefinition.setContext(subContext);

      final StringBuilder buf = new StringBuilder(256);
      buf.append(classDefinition.membersToString().trim()).append("\n");
View Full Code Here

    this.methodComment = methodComment;
  }

  @Override
  public String toJavaString() {
    final Context context = Context.create(declaringClass.getContext());

    for (final Parameter p : defParameters.getParameters()) {
      context.addVariable(Variable.create(p.getName(), p.getType()));
    }
    final StringBuilder buf = new StringBuilder(256);

    if (!annotations.isEmpty()) {
      for (final Annotation a : getAnnotations()) {
View Full Code Here

    logger.log(com.google.gwt.core.ext.TreeLogger.Type.DEBUG, "Generating IOC Bootstrapper "
        + packageName + "." + className);

    final BuildMetaClass bootStrapClass = classStructureBuilder.getClassDefinition();
    final Context buildContext = bootStrapClass.getContext();

    buildContext.addInterningCallback(new BootstrapInterningCallback(classStructureBuilder, buildContext));

    final BlockBuilder<?> blockBuilder =
        classStructureBuilder.publicMethod(contextClass, "bootstrapContainer")
            .methodComment("The main IOC bootstrap method.");
View Full Code Here

TOP

Related Classes of org.jboss.errai.codegen.Context

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.