Package org.jboss.errai.ioc.rebind.ioc.codegen

Examples of org.jboss.errai.ioc.rebind.ioc.codegen.Context


    super(decoratesWith);
  }

  @Override
  public Statement generateDecorator(InjectableInstance<Observes> instance) {
    final Context ctx = instance.getInjectionContext().getProcessingContext().getContext();
    final MetaMethod method = instance.getMethod();
    final MetaParameter parm = instance.getParm();

    final String parmClassName = parm.getType().getFullyQualifiedName();
    final Statement bus = instance.getInjectionContext().getInjector(MessageBus.class).getType(instance);
View Full Code Here


    StringBuilder buf = new StringBuilder("try {\n");
    buf.append(block.generate(context)).append("\n} ");

    if (!catchBlocks.isEmpty()) {
      for (Variable exception : catchBlocks.keySet()) {
        Context ctx = Context.create(context).addVariable(exception);
        buf.append("catch (").append(exception.generate(ctx)).append(") ")
            .append("{\n")
            .append(catchBlocks.get(exception).generate(ctx))
            .append("\n} ");
      }
    }
    else if (finallyBlock == null) {
      finallyBlock = new BlockStatement();
    }

    if (finallyBlock != null) {
      Context ctx = Context.create(context);
      buf.append(" finally {\n").append(finallyBlock.generate(ctx)).append("\n}\n");
    }

    return buf.toString();
  }
View Full Code Here

          public AnonymousClassStructureBuilderImpl callback(final Statement statement) {

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

                StringBuilder buf = new StringBuilder();
                buf.append("public ").append(getClassReference(method.getReturnType(), context))
                    .append(" ")
View Full Code Here

TOP

Related Classes of org.jboss.errai.ioc.rebind.ioc.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.