Package net.sourceforge.javautil.bytecode.api.type.method

Examples of net.sourceforge.javautil.bytecode.api.type.method.BytecodeEmbedded


   
    for (String field : this.fields.keySet()) {
      context.getWriter().declareField(context, field, this.fields.get(field));
    }
   
    final BytecodeEmbedded cinit = this.getClassInitializer();
   
    if (cinit != null || this.defaultStaticValues.size() > 0) {
      BytecodeMethodConcrete clinit = new BytecodeMethodConcrete(this, "<clinit>", new TypeMemberAccess(Scope.Private, false, true, true),
        new MethodDescriptor(false, void.class, new Class[0], new Class[0]));
     
      clinit.setMethodBody(new BytecodeBlock() {
       
        @Override protected void writeInstructions(BytecodeContextMethod context) {
          for (String name : defaultStaticValues.keySet()) {
            context.set(context.getStaticField(name), defaultStaticValues.get(name));
          }
         
          if (cinit != null) cinit.write(context);
        }
       
      });
     
      context.getWriter().writeMethod(context, clinit);
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.bytecode.api.type.method.BytecodeEmbedded

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.