org.jboss.aop.advice
Class ClassifiedBindingAndPointcutCollection

java.lang.Object
  extended by org.jboss.aop.advice.ClassifiedBindingAndPointcutCollection

public class ClassifiedBindingAndPointcutCollection
extends Object

Manages the binding, pointcut and pointcutInfo collections contained in a domain. All entries contained in this collection are indexed according to their classification.

For internal use only.

Author:
Flavia Rainone, Kabir Khan

Constructor Summary
ClassifiedBindingAndPointcutCollection()
          Constructor.
 
Method Summary
 void add(AdviceBinding binding, AspectManager manager)
          Adds a binding to this collection.
 void add(Pointcut pointcut, AspectManager manager)
          Adds a pointcut to this collection
 LinkedHashMap<String,AdviceBinding> getBindings()
          Returns the bindings map.
 LinkedHashMap<String,AdviceBinding> getBindingsInternal()
          Deprecated. 
 Collection<AdviceBinding> getConstructionBindings()
          Returns only the bindings whose pointcuts may match successfully construction joinpoints.
 Collection<PointcutInfo> getConstructionPointcutInfos()
          Returns only the pointcut infos that may match successfully construction joinpoints.
 Collection<Pointcut> getConstructionPointcuts()
          Returns only the pointcuts that may match successfully construction joinpoints.
 Collection<AdviceBinding> getConstructorCallBindings()
          Returns only the bindings whose pointcuts may match successfully constructor call joinpoints.
 Collection<PointcutInfo> getConstructorCallPointcutInfos()
          Returns only the pointcut infos that may match successfully constructor call joinpoints.
 Collection<Pointcut> getConstructorCallPointcuts()
          Returns only the pointcuts that may match successfully constructor call joinpoints.
 Collection<AdviceBinding> getConstructorExecutionBindings()
          Returns only the bindings whose pointcuts may match successfully constructor execution joinpoints.
 Collection<PointcutInfo> getConstructorExecutionPointcutInfos()
          Returns only the pointcut infos that may match successfully constructor execution joinpoints.
 Collection<Pointcut> getConstructorExecutionPointcuts()
          Returns only the pointcuts that may match successfully constructor execution joinpoints.
 Collection<AdviceBinding> getFieldReadBindings()
          Returns only the bindings whose pointcuts may match successfully field read joinpoints.
 Collection<PointcutInfo> getFieldReadPointcutInfos()
          Returns only the pointcut infos that may match successfully field read joinpoints.
 Collection<Pointcut> getFieldReadPointcuts()
          Returns only the pointcuts that may match successfully field read joinpoints.
 Collection<AdviceBinding> getFieldWriteBindings()
          Returns only the bindings whose pointcuts may match successfully field write joinpoints.
 Collection<PointcutInfo> getFieldWritePointcutInfos()
          Returns only the pointcut infos that may match successfully field write joinpoints.
 Collection<Pointcut> getFieldWritePointcuts()
          Returns only the pointcuts that may match successfully field write joinpoints.
 Collection<AdviceBinding> getMethodCallBindings()
          Returns only the bindings whose pointcuts may match successfully method call joinpoints.
 Collection<PointcutInfo> getMethodCallPointcutInfos()
          Returns only the pointcut infos that may match successfully method call joinpoints.
 Collection<Pointcut> getMethodCallPointcuts()
          Returns only the pointcuts that may match successfully method call joinpoints.
 Collection<AdviceBinding> getMethodExecutionBindings()
          Returns only the bindings whose pointcuts may match successfully method execution joinpoints.
 Collection<PointcutInfo> getMethodExecutionPointcutInfos()
          Returns only the pointcut infos that may match successfully method execution joinpoints.
 Collection<Pointcut> getMethodExecutionPointcuts()
          Returns only the pointcuts that may match successfully method execution joinpoints.
 Pointcut getPointcut(String name)
          Gets the pointcut named name
 LinkedHashMap<String,PointcutInfo> getPointcutInfos()
          Returns the pointcutInfos map.
 LinkedHashMap<String,PointcutInfo> getPointcutInfosInternal()
          Deprecated. 
 LinkedHashMap<String,Pointcut> getPointcuts()
          Returns the pointcuts map.
 LinkedHashMap<String,Pointcut> getPointcutsInternal()
          Deprecated. 
 boolean hasPointcuts()
          Check if there are any pointcuts stored at this level
 boolean isCall()
           
 boolean isConstruction()
           
 boolean isEmpty()
          Indicate whether this collection is empty.
 boolean isExecution()
           
 boolean isGet()
           
 boolean isSet()
           
 boolean isWithin()
           
 boolean isWithincode()
           
 AdviceBinding removeBinding(String name)
          Removes the binding named name.
 ArrayList<AdviceBinding> removeBindings(ArrayList<String> names)
          Removes all bindings whose names are contained in names.
 void removePointcut(Pointcut pc)
          Removes the pointcut and the equivalent pointcutInfo.
 void removePointcut(String name)
          Removes the pointcut and pointcutInfo named name
 void updateStats(PointcutStats stats)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassifiedBindingAndPointcutCollection

public ClassifiedBindingAndPointcutCollection()
Constructor.

Method Detail

hasPointcuts

public boolean hasPointcuts()
Check if there are any pointcuts stored at this level


getFieldReadBindings

public Collection<AdviceBinding> getFieldReadBindings()
Returns only the bindings whose pointcuts may match successfully field read joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the bindings that may match field read pointcuts

getFieldWriteBindings

public Collection<AdviceBinding> getFieldWriteBindings()
Returns only the bindings whose pointcuts may match successfully field write joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the bindings that may match field write pointcuts

getConstructionBindings

public Collection<AdviceBinding> getConstructionBindings()
Returns only the bindings whose pointcuts may match successfully construction joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the bindings that may match construction pointcuts

getConstructorExecutionBindings

public Collection<AdviceBinding> getConstructorExecutionBindings()
Returns only the bindings whose pointcuts may match successfully constructor execution joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the bindings that may match constructor execution pointcuts

getMethodExecutionBindings

public Collection<AdviceBinding> getMethodExecutionBindings()
Returns only the bindings whose pointcuts may match successfully method execution joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the bindings that may match method execution pointcuts

getConstructorCallBindings

public Collection<AdviceBinding> getConstructorCallBindings()
Returns only the bindings whose pointcuts may match successfully constructor call joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the bindings that may match constructor call pointcuts

getMethodCallBindings

public Collection<AdviceBinding> getMethodCallBindings()
Returns only the bindings whose pointcuts may match successfully method call joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the bindings that may match method call pointcuts

getFieldReadPointcuts

public Collection<Pointcut> getFieldReadPointcuts()
Returns only the pointcuts that may match successfully field read joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcuts that may match field read pointcuts

getFieldWritePointcuts

public Collection<Pointcut> getFieldWritePointcuts()
Returns only the pointcuts that may match successfully field write joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcuts that may match field write pointcuts

getConstructionPointcuts

public Collection<Pointcut> getConstructionPointcuts()
Returns only the pointcuts that may match successfully construction joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcuts that may match construction pointcuts

getConstructorExecutionPointcuts

public Collection<Pointcut> getConstructorExecutionPointcuts()
Returns only the pointcuts that may match successfully constructor execution joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcuts that may match constructor execution pointcuts

getMethodExecutionPointcuts

public Collection<Pointcut> getMethodExecutionPointcuts()
Returns only the pointcuts that may match successfully method execution joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcuts that may match method execution pointcuts

getConstructorCallPointcuts

public Collection<Pointcut> getConstructorCallPointcuts()
Returns only the pointcuts that may match successfully constructor call joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcuts that may match constructor call pointcuts

getMethodCallPointcuts

public Collection<Pointcut> getMethodCallPointcuts()
Returns only the pointcuts that may match successfully method call joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcuts that may match method call pointcuts

getFieldReadPointcutInfos

public Collection<PointcutInfo> getFieldReadPointcutInfos()
Returns only the pointcut infos that may match successfully field read joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcut infos that may match field read pointcuts

getFieldWritePointcutInfos

public Collection<PointcutInfo> getFieldWritePointcutInfos()
Returns only the pointcut infos that may match successfully field write joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcut infos that may match field write pointcuts

getConstructionPointcutInfos

public Collection<PointcutInfo> getConstructionPointcutInfos()
Returns only the pointcut infos that may match successfully construction joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcut infos that may match construction pointcuts

getConstructorExecutionPointcutInfos

public Collection<PointcutInfo> getConstructorExecutionPointcutInfos()
Returns only the pointcut infos that may match successfully constructor execution joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcut infos that may match constructor execution pointcuts

getMethodExecutionPointcutInfos

public Collection<PointcutInfo> getMethodExecutionPointcutInfos()
Returns only the pointcut infos that may match successfully method execution joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcut infos that may match method execution pointcuts

getConstructorCallPointcutInfos

public Collection<PointcutInfo> getConstructorCallPointcutInfos()
Returns only the pointcut infos that may match successfully constructor call joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcut infos that may match constructor call pointcuts

getMethodCallPointcutInfos

public Collection<PointcutInfo> getMethodCallPointcutInfos()
Returns only the pointcut infos that may match successfully method call joinpoints.

Attention: this collection is not supposed to be edited.

Returns:
a collection containing exclusively the pointcut infos that may match method call pointcuts

isEmpty

public boolean isEmpty()
Indicate whether this collection is empty.


getBindings

public LinkedHashMap<String,AdviceBinding> getBindings()
Returns the bindings map.

Returns:
an unmodifiable map containing all the bindings

getBindingsInternal

@Deprecated
public LinkedHashMap<String,AdviceBinding> getBindingsInternal()
Deprecated. 

Returns the bindings map. This method is only for internal use, hence the @Deprecated

Returns:
a map containing all the bindings

getPointcuts

public LinkedHashMap<String,Pointcut> getPointcuts()
Returns the pointcuts map.

Returns:
an modifiable map containing all the pointcuts

getPointcutsInternal

@Deprecated
public LinkedHashMap<String,Pointcut> getPointcutsInternal()
Deprecated. 

Returns the pointcuts map. This method is only for internal use, hence the @Deprecated

Returns:
a map containing all the pointcuts

getPointcutInfos

public LinkedHashMap<String,PointcutInfo> getPointcutInfos()
Returns the pointcutInfos map.

Returns:
an unmodifiable map containing all the pointcutInfos

getPointcutInfosInternal

@Deprecated
public LinkedHashMap<String,PointcutInfo> getPointcutInfosInternal()
Deprecated. 

Returns the pointcutInfos map. This method is only for internal use, hence the @Deprecated

Returns:
an unmodifiable map containing all the pointcutInfos

add

public void add(AdviceBinding binding,
                AspectManager manager)
Adds a binding to this collection.


add

public void add(Pointcut pointcut,
                AspectManager manager)
Adds a pointcut to this collection


removeBinding

public AdviceBinding removeBinding(String name)
Removes the binding named name.

Parameters:
name - name of the binding to be removed.
Returns:
the removed binding. If null, indicates that there is no binding with name equal to name in this collection.

removePointcut

public void removePointcut(String name)
Removes the pointcut and pointcutInfo named name

Parameters:
name - the name of the pointcut to be removed

getPointcut

public Pointcut getPointcut(String name)
Gets the pointcut named name

Parameters:
name - the name of the pointcut to get
Returns:
the pointcut

removeBindings

public ArrayList<AdviceBinding> removeBindings(ArrayList<String> names)
Removes all bindings whose names are contained in names.

Parameters:
names - names of all bindings to be removed
Returns:
the collection of the removed bindings

isExecution

public boolean isExecution()

isConstruction

public boolean isConstruction()

isCall

public boolean isCall()

isWithin

public boolean isWithin()

isWithincode

public boolean isWithincode()

isGet

public boolean isGet()

isSet

public boolean isSet()

removePointcut

public void removePointcut(Pointcut pc)
Removes the pointcut and the equivalent pointcutInfo.

Parameters:
pc - the pointcut to be removed

updateStats

public void updateStats(PointcutStats stats)


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.