Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter.newInstance()


  private void buildComputationFactoryMethod()
  {
    final GeneratorAdapter mv = newMethod( "newComputation", "(Ljava/lang/Object;)"
        + ByteCodeEngineCompiler.COMPUTATION_INTF.getDescriptor() );
    mv.newInstance( ByteCodeEngineCompiler.GEN_ROOT_CLASS );
    mv.dup();
    mv.loadArg( 0 );
    compileClassRef( this.userInputClass, this.userInputType );
    mv.checkCast( this.userInputType );
    mv.loadThis();
View Full Code Here


  private void buildUserFactoryMethod()
  {
    final GeneratorAdapter mv = newMethod( this.userFactoryMethod.getName(), Type
        .getMethodDescriptor( this.userFactoryMethod ) );
    mv.newInstance( ByteCodeEngineCompiler.GEN_ROOT_CLASS );
    mv.dup();
    mv.loadArg( 0 );
    mv.loadThis();
    mv.getField( classType(), ByteCodeEngineCompiler.ENV_MEMBER_NAME, ByteCodeEngineCompiler.ENV_CLASS );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, ByteCodeEngineCompiler.GEN_ROOT_CLASS.getInternalName(), "<init>", "("
View Full Code Here

      adapter.visitLabel(methodBegin);

      //ExpressionUtil.visitLine(adapter, component.getStartLine());
     
    int comp=adapter.newLocal(Types.COMPONENT_IMPL);
    adapter.newInstance(Types.COMPONENT_IMPL);
    adapter.dup();
   
    Attribute attr;
    // ComponentPage
    adapter.visitVarInsn(Opcodes.ALOAD, 0);
View Full Code Here

  public void _writeOut(BytecodeContext bc) throws BytecodeException {
    GeneratorAdapter adapter = bc.getAdapter();
   
  // Array cases=new ArrayImpl();
    int array=adapter.newLocal(Types.ARRAY);
    adapter.newInstance(ARRAY_IMPL);
    adapter.dup();
    adapter.invokeConstructor(ARRAY_IMPL, INIT);
   
    adapter.storeLocal(array);
   
View Full Code Here

      //ExpressionUtil.visitLine(adapter, interf.getStartLine());
     
    int comp=adapter.newLocal(Types.INTERFACE_IMPL);
   
   
    adapter.newInstance(Types.INTERFACE_IMPL);
    adapter.dup();
   
   
    Attribute attr;
    // Interface Page
View Full Code Here

      bc.getAdapter().cast(Types.OBJECT,STRUCT_IMPL);
      return;
    }
   
    int sct=adapter.newLocal(STRUCT_IMPL);
    adapter.newInstance(STRUCT_IMPL);
    adapter.dup();
    adapter.invokeConstructor(STRUCT_IMPL, INIT_STRUCT_IMPL);
    adapter.storeLocal(sct);
    if(meta!=null) {
      _createMetaDataStruct(bc,adapter,sct,meta);
View Full Code Here

 
 
 
  public final void createUDFProperties(BytecodeContext bc, int index, boolean closure) throws BytecodeException {
    GeneratorAdapter adapter=bc.getAdapter();
    adapter.newInstance(Types.UDF_PROPERTIES_IMPL);
    adapter.dup();
    if(closure){
      adapter.loadThis();
      adapter.invokeVirtual(Types.PAGE, GET_PAGESOURCE);
    }
View Full Code Here

  }*/
 
  public final void createUDF(BytecodeContext bc, int index, boolean closure) throws BytecodeException {
    // new UDF(...)
    GeneratorAdapter adapter=bc.getAdapter();
    adapter.newInstance(closure?Types.CLOSURE:Types.UDF_IMPL);
    adapter.dup();
   
    createUDFProperties(bc, index,closure);
    //loadUDFProperties(bc, index,closure);
   
View Full Code Here

      // write out arguments 
        ga.dup();
            ga.push(i);
             
            // new FunctionArgument(...)
            ga.newInstance(canHaveKey && functionIndex<INIT_FAI_KEY_LIGHT.length?FUNCTION_ARGUMENT_LIGHT:FUNCTION_ARGUMENT_IMPL);
        ga.dup();
        Variable.registerKey(bc,arg.getName(),false);
       
        // type
        if(functionIndex>=INIT_FAI_KEY.length-7) {
View Full Code Here

    else if(pageType==PAGE_TYPE_INTERFACE) {
      loadUDFProperties(bc,valueIndex,arrayIndex,false);
      adapter.invokeVirtual(Types.INTERFACE_IMPL, hasKey?REG_UDF_KEY:REG_UDF_STR);
    }
    else {
      adapter.newInstance(Types.UDF_IMPL);
      adapter.dup();
      loadUDFProperties(bc, valueIndex,arrayIndex,false);
      adapter.invokeConstructor(Types.UDF_IMPL, INIT_UDF_IMPL_PROP);
     
      //loadUDF(bc, index);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.