Esempio n. 1
0
  public static <T> T aspect(Class<? extends T> iClass) {
    String aspectName = Utility.getClassName(iClass);
    int pos = aspectName.indexOf("Aspect");
    if (pos == -1)
      throw new ConfigurationNotFoundException(
          "Cannot find aspect implementation for class: " + aspectName);

    aspectName = aspectName.substring(0, pos).toLowerCase();
    checkForAspectManager();
    return (T) aspectManager.getAspect(aspectName);
  }
Esempio n. 2
0
 public static Collection<Aspect> aspects() {
   checkForAspectManager();
   return aspectManager.getAspectCollection();
 }
Esempio n. 3
0
 public static <T> T aspect(String iName) {
   checkForAspectManager();
   return (T) aspectManager.getAspect(iName);
 }