Exemplo 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);
  }
Exemplo n.º 2
0
 public static Collection<Aspect> aspects() {
   checkForAspectManager();
   return aspectManager.getAspectCollection();
 }
Exemplo n.º 3
0
 public static <T> T aspect(String iName) {
   checkForAspectManager();
   return (T) aspectManager.getAspect(iName);
 }