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

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


   * @param varArgs True if the last argument is an array and can be used as var args
   * @param parameters The parameters for the constructor
   * @return The new constructor
   */
  public BytecodeConstructorBase addConstructor (Scope scope, boolean varArgs, TypeDescriptor... parameters) {
    this.constructors.add(new BytecodeConstructorBase(this, new TypeMemberAccess(scope, false, false, false),
      varArgs, parameters));
    return this.constructors.get(constructors.size()-1);
  }
View Full Code Here


    InterceptorProxyConstructor apc = new InterceptorProxyConstructor(abilities);
    for (IBytecodeConstructor constructor : getSuperType().getDeclaredConstructors()) {
      if (constructor.getAccess().getScope() == Scope.Public) {
        TypeDescriptor[] parameters = constructor.getDescriptor().getParameters();
        parameters = CollectionUtil.insert(parameters, 0, TypeDescriptor.getFor(IInterceptorManager.class));
        BytecodeConstructorBase pc = this.addConstructor(Scope.Public, constructor.isVarArgs(), parameters);
        pc.copyAnnotations(constructor);
        pc.setMethodBody(apc);
      }
    }
  }
View Full Code Here

    InterceptorProxyConstructor apc = new InterceptorProxyConstructor(abilities);
    for (IBytecodeConstructor constructor : getSuperType().getDeclaredConstructors()) {
      if (constructor.getAccess().getScope() == Scope.Public) {
        TypeDescriptor[] parameters = constructor.getDescriptor().getParameters();
        parameters = CollectionUtil.insert(parameters, 0, TypeDescriptor.getFor(IInterceptorManager.class), TypeDescriptor.getFor(IInterceptedInstanceWrapper.class));
        BytecodeConstructorBase pc = this.addConstructor(Scope.Public, constructor.isVarArgs(), parameters);
        pc.copyAnnotations(constructor);
        pc.setMethodBody(apc);
      }
    }
  }
View Full Code Here

TOP

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

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.