1 15 16 17 package org.aspectj.runtime.internal; 18 19 import org.aspectj.lang.ProceedingJoinPoint; 20 21 public abstract class AroundClosure { 22 protected Object [] state; 23 24 protected int bitflags = 0x100000; 29 protected Object [] preInitializationState; 30 31 public AroundClosure() { 32 } 33 34 public AroundClosure(Object [] state) { 35 this.state = state; 36 } 37 38 public int getFlags() {return bitflags;} 39 40 public Object [] getState() { 41 return state; 42 } 43 44 public Object [] getPreInitializationState() { 45 return preInitializationState; 46 } 47 48 52 public abstract Object run(Object [] args) throws Throwable ; 53 54 58 public ProceedingJoinPoint linkClosureAndJoinPoint() { 59 ProceedingJoinPoint jp = (ProceedingJoinPoint)state[state.length-1]; 61 jp.set$AroundClosure(this); 62 return jp; 63 } 64 65 69 public ProceedingJoinPoint linkClosureAndJoinPoint(int flags) { 70 ProceedingJoinPoint jp = (ProceedingJoinPoint)state[state.length-1]; 72 jp.set$AroundClosure(this); 73 this.bitflags = flags; 74 return jp; 75 } 76 } 77 | Popular Tags |