public AspectJTypeFilter(String typePatternExpression, @Nullable ClassLoader classLoader) { this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null); this.world.setBehaveInJava5Way(true); PatternParser patternParser = new PatternParser(typePatternExpression); TypePattern typePattern = patternParser.parseTypePattern(); typePattern.resolve(this.world); IScope scope = new SimpleScope(this.world, new FormalBinding[0]); this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false); }
public AspectJTypeFilter(String typePatternExpression, @Nullable ClassLoader classLoader) { this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null); this.world.setBehaveInJava5Way(true); PatternParser patternParser = new PatternParser(typePatternExpression); TypePattern typePattern = patternParser.parseTypePattern(); typePattern.resolve(this.world); IScope scope = new SimpleScope(this.world, new FormalBinding[0]); this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false); }
public AspectJTypeFilter(String typePatternExpression, ClassLoader classLoader) { this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null); this.world.setBehaveInJava5Way(true); PatternParser patternParser = new PatternParser(typePatternExpression); TypePattern typePattern = patternParser.parseTypePattern(); typePattern.resolve(this.world); IScope scope = new SimpleScope(this.world, new FormalBinding[0]); this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false); }
public AspectJTypeFilter(String typePatternExpression, @Nullable ClassLoader classLoader) { this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null); this.world.setBehaveInJava5Way(true); PatternParser patternParser = new PatternParser(typePatternExpression); TypePattern typePattern = patternParser.parseTypePattern(); typePattern.resolve(this.world); IScope scope = new SimpleScope(this.world, new FormalBinding[0]); this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false); }
public AspectJTypeFilter(String typePatternExpression, @Nullable ClassLoader classLoader) { this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null); this.world.setBehaveInJava5Way(true); PatternParser patternParser = new PatternParser(typePatternExpression); TypePattern typePattern = patternParser.parseTypePattern(); typePattern.resolve(this.world); IScope scope = new SimpleScope(this.world, new FormalBinding[0]); this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false); }
public AspectJTypeFilter(String typePatternExpression, ClassLoader classLoader) { this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null); this.world.setBehaveInJava5Way(true); PatternParser patternParser = new PatternParser(typePatternExpression); TypePattern typePattern = patternParser.parseTypePattern(); typePattern.resolve(this.world); IScope scope = new SimpleScope(this.world, new FormalBinding[0]); this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false); }
private IScope buildResolutionScope(Class<?> inScope, PointcutParameter[] formalParameters) { if (formalParameters == null) { formalParameters = new PointcutParameter[0]; } FormalBinding[] formalBindings = new FormalBinding[formalParameters.length]; for (int i = 0; i < formalBindings.length; i++) { formalBindings[i] = new FormalBinding(toUnresolvedType(formalParameters[i].getType()), formalParameters[i].getName(), i); } if (inScope == null) { return new SimpleScope(getWorld(), formalBindings); } else { ResolvedType inType = getWorld().resolve(inScope.getName()); ISourceContext sourceContext = new ISourceContext() { public ISourceLocation makeSourceLocation(IHasPosition position) { return new SourceLocation(new File(""), 0); } public ISourceLocation makeSourceLocation(int line, int offset) { return new SourceLocation(new File(""), line); } public int getOffset() { return 0; } public void tidy() { } }; return new BindingScope(inType, sourceContext, formalBindings); } }
perRequestScope = new SimpleScope(); Injector injector = Guice.createInjector(new AbstractModule()
SimpleScope ss = new SimpleScope(getWorld(), formalBindings); ss.setImportedPrefixes(new String[] { "java.lang.", "java.util." }); return ss;
private final SimpleScope fakeRequestScope = new SimpleScope(); private final HttpServletRequest request = new FakeHttpServletRequest();