## org.aspectj.lang
Class Aspects

    java.lang.Object
      org.aspectj.lang.Aspects

    public class Aspects

extends java.lang.Object

Handles generic aspectOf method when those are not available in the aspects but added later on thru load time weaving.

Aspects.aspectOf(..) is doing reflective calls to the aspect aspectOf, so for better performance consider using ajc compilation of the aspects and using them as a binary dependancies in your project.

Author:
  Alexandre Vasseur

Constructor Summary
`Aspects()`

Method Summary
`static java.lang.Object` `aspectOf(java.lang.Class aspectClass)` Returns the singleton aspect or the percflow / percflowbelow associated with the current thread
`static java.lang.Object` `aspectOf(java.lang.Class aspectClass, java.lang.Class perTypeWithin)` Returns the pertypewithin aspect
`static java.lang.Object` `aspectOf(java.lang.Class aspectClass, java.lang.Object perObject)` Returns the perthis / pertarget aspect
`static boolean` `hasAspect(java.lang.Class aspectClass)` Returns true if singleton aspect or percflow / percflowbelow aspect is bound
`static boolean` `hasAspect(java.lang.Class aspectClass, java.lang.Class perTypeWithin)` Returns true if the pertypewithin aspect is bound
`static boolean` `hasAspect(java.lang.Class aspectClass, java.lang.Object perObject)` Returns true if the perthis / pertarget aspect is bound

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Aspects

    public Aspects()

Method Detail

### aspectOf

    public static java.lang.Object aspectOf(java.lang.Class aspectClass)
                                     throws NoAspectBoundException

  Returns the singleton aspect or the percflow / percflowbelow associated with the current thread

  Parameters:
    `aspectClass` -
  Returns:
  Throws:
    `NoAspectBoundException` - if no such aspect

### aspectOf

    public static java.lang.Object aspectOf(java.lang.Class aspectClass,
                                            java.lang.Object perObject)
                                     throws NoAspectBoundException

  Returns the perthis / pertarget aspect

  Parameters:
    `aspectClass` -
    `perObject` -
  Returns:
  Throws:
    `NoAspectBoundException` - if no such aspect, or no aspect bound

### aspectOf

    public static java.lang.Object aspectOf(java.lang.Class aspectClass,
                                            java.lang.Class perTypeWithin)
                                     throws NoAspectBoundException

  Returns the pertypewithin aspect

  Parameters:
    `aspectClass` -
    `perTypeWithin` - class
  Returns:
  Throws:
    `NoAspectBoundException` - if no such aspect, or no aspect bound

### hasAspect

    public static boolean hasAspect(java.lang.Class aspectClass)
                             throws NoAspectBoundException

  Returns true if singleton aspect or percflow / percflowbelow aspect is bound

  Parameters:
    `aspectClass` -
  Returns:
  Throws:
    `NoAspectBoundException` - if not bound

### hasAspect

    public static boolean hasAspect(java.lang.Class aspectClass,
                                    java.lang.Object perObject)
                             throws NoAspectBoundException

  Returns true if the perthis / pertarget aspect is bound

  Parameters:
    `aspectClass` -
    `perObject` -
  Returns:
  Throws:
    `NoAspectBoundException` - if not bound

### hasAspect

    public static boolean hasAspect(java.lang.Class aspectClass,
                                    java.lang.Class perTypeWithin)
                             throws NoAspectBoundException

  Returns true if the pertypewithin aspect is bound

  Parameters:
    `aspectClass` -
    `perTypeWithin` - class
  Returns:
  Throws:
    `NoAspectBoundException` - if not bound