public int getIndex() { return wrapped.getIndex(); }
/** * Invokes the target joinpoint for this invocation skipping any subsequent * interceptors in the chain. */ public Object invokeTarget() throws Throwable { field.set(getTargetObject(), getValue()); return null; }
/** * Copies complete state of Invocation object. * @return */ public Invocation copy() { FieldWriteInvocation wrapper = new FieldWriteInvocation(field, index, value, interceptors); wrapper.setAdvisor(this.getAdvisor()); wrapper.setTargetObject(this.getTargetObject()); wrapper.currentInterceptor = this.currentInterceptor; wrapper.instanceResolver = this.instanceResolver; wrapper.metadata = this.metadata; return wrapper; }
/** * Invokes interceptor chain. * This is the beginning */ public Object invokeWrite(Object target, int index, Object value) throws Throwable { Interceptor[] aspects = fieldWriteInfos[index].getInterceptors(); if (aspects == null) aspects = new Interceptor[0]; FieldWriteInvocation invocation; if (target != null) { InstanceAdvised advised = (InstanceAdvised) target; InstanceAdvisor advisor = advised._getInstanceAdvisor(); if (advisor != null && advisor.hasInterceptors()) { aspects = advised._getInstanceAdvisor().getInterceptors(aspects); } } invocation = new FieldWriteInvocation(advisedFields[index], index, value, aspects); invocation.setAdvisor(this); invocation.setTargetObject(target); return invocation.invokeNext(); }
Object target = fieldInvocation.getTargetObject(); Object val = fieldInvocation.getValue(); Field field = fieldInvocation.getField(); field.set(target, val); return null;
public Object getValue() { return wrapped.getValue(); }
return p.matchesSet(mi.getAdvisor(), mi.getField());
public Object getMetaData(Object group, Object attr) { return wrapped.getMetaData(group, attr); }
public MetaDataResolver getInstanceResolver() { return wrapped.getInstanceResolver(); }
public Field getField() { return wrapped.getField(); }
public Object getResponseAttachment(Object key) { return wrapped.getResponseAttachment(key); }
public Advisor getAdvisor() { return wrapped.getAdvisor(); }
public void addResponseAttachment(Object key, Object val) { wrapped.addResponseAttachment(key, val); }
public Invocation copy() { FieldWriteInvocationWrapper invocation = new FieldWriteInvocationWrapper((FieldWriteInvocation)wrapped.copy(), interceptors); invocation.currentInterceptor = this.currentInterceptor; return invocation; }
public Object access(FieldWriteInvocation invocation) throws Throwable { threadbased.set(invocation.getValue()); return null; } }
public SimpleMetaData getMetaData() { return wrapped.getMetaData(); }