Examples of IBytecodeField


Examples of net.sourceforge.javautil.bytecode.api.IBytecodeField

    context.getTarget().visitVarInsn(type.getOpcode(ILOAD), idx);
    context.push(ts);
  }
 
  public void loadField(BytecodeContextMethodASM context, IBytecodeResolvable type, String name) {
    IBytecodeField field = type.getField(context.getResolutionPool(), name);
    if (field == null) throw new BytecodeException("No such field " + name + " for " + type.getType().getClassName());
   
    context.getTarget().visitFieldInsn(GETFIELD, type.getType().getName(), name, field.getType().toDescriptorString());
    context.popStack();
    context.push(field.getType());
  }
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeField

    context.popStack();
    context.push(field.getType());
  }

  public void loadStaticField(BytecodeContextMethodASM context, IBytecodeResolvable type, String name) {
    IBytecodeField field = type.getField(context.getResolutionPool(), name);
    if (field == null) throw new BytecodeException("No such field " + name + " for " + type.getType().getClassName());
   
    context.getTarget().visitFieldInsn(GETSTATIC, type.getType().getName(), name, field.getType().toDescriptorString());
    context.push(field.getType());
  }
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeField

    context.getTarget().visitFieldInsn(GETSTATIC, type.getType().getName(), name, field.getType().toDescriptorString());
    context.push(field.getType());
  }

  public void storeField(BytecodeContextMethodASM context, IBytecodeResolvable type, String name) {
    IBytecodeField field = type.getField(context.getResolutionPool(), name);
    if (field == null) throw new BytecodeException("No such field " + name + " for " + type.getType().getClassName());
   
    context.getTarget().visitFieldInsn(PUTFIELD, type.getType().getName(), name, field.getType().toDescriptorString());
    context.popStack();
    context.popStack();
  }
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeField

    context.popStack();
    context.popStack();
  }

  public void storeStaticField(BytecodeContextMethodASM context, IBytecodeResolvable type, String name) {
    IBytecodeField field = type.getField(context.getResolutionPool(), name);
    if (field == null) throw new BytecodeException("No such field " + name + " for " + type.getType().getClassName());
   
    context.getTarget().visitFieldInsn(PUTSTATIC, type.getType().getName(), name, field.getType().toDescriptorString());
    context.popStack();
  }
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeField

   * @return The names of the fields for this type
   */
  public Set<String> getFieldNames () { return fields.keySet(); }
 
  public IBytecodeField getField (BytecodeResolutionPool pool, String name) {
    IBytecodeField thisField = this.fields.get(name);
   
    if (thisField == null && superType != null) {
      thisField = this.superType.getField(pool, name);
    }
   
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeField

    context.set("this", InterceptorProxyTypeInterceptor.INTERCEPTOR_FIELD_NAME, context.getDeclaredParameter(0));
    context.set("this", InterceptorProxyTypeCJCW.TARGET_FIELD_NAME, context.getDeclaredParameter(1));
   
    if (abilities != null && abilities.size() > 0) {
      BytecodeLocalVariableDeclaration interceptor = context.getDeclaredParameter(0);
      IBytecodeField state = context.getEnclosingType().getField(context.getResolutionPool(), InterceptorProxyTypeInterceptor.ABILITIES_FIELD_NAME);
     
      context.set("this", InterceptorProxyTypeInterceptor.ABILITIES_FIELD_NAME, context.createNewInstanceInvocation(context.resolve(HashMap.class)));
     
      for (IInterceptorManipulator ability : abilities) {
        ability.manipulate(context, interceptor, state);
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeField

    context.set("this", InterceptorProxyTypeInterceptor.CACHE_FIELD_NAME, context.createNewInstanceInvocation(context.resolve(HashMap.class)));
    context.set("this", InterceptorProxyTypeInterceptor.INTERCEPTOR_FIELD_NAME, context.getDeclaredParameter(0));
   
    if (abilities != null && abilities.size() > 0) {
      BytecodeLocalVariableDeclaration interceptor = context.getDeclaredParameter(0);
      IBytecodeField state = context.getEnclosingType().getField(context.getResolutionPool(), InterceptorProxyTypeInterceptor.ABILITIES_FIELD_NAME);
     
      context.set("this", InterceptorProxyTypeInterceptor.ABILITIES_FIELD_NAME, context.createNewInstanceInvocation(context.resolve(HashMap.class)));
     
      for (IInterceptorManipulator ability : abilities) {
        ability.manipulate(context, interceptor, state);
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.