Package org.aspectj.lang.annotation

Examples of org.aspectj.lang.annotation.Aspect


    return dec != null ? new AjTypeImpl(dec) : null;
  }
 
  public PerClause getPerClause() {
    if (isAspect()) {
      Aspect aspectAnn = clazz.getAnnotation(Aspect.class);
      String perClause = aspectAnn.value();
      if (perClause.equals("")) {
        if (getSupertype().isAspect()) {
          return getSupertype().getPerClause();
        }
        return new PerClauseImpl(PerClauseKind.SINGLETON);
View Full Code Here


    return dec != null ? new AjTypeImpl(dec) : null;
  }
 
  public PerClause getPerClause() {
    if (isAspect()) {
      Aspect aspectAnn = clazz.getAnnotation(Aspect.class);
      String perClause = aspectAnn.value();
      if (perClause.equals("")) {
        if (getSupertype().isAspect()) {
          return getSupertype().getPerClause();
        }
        return new PerClauseImpl(PerClauseKind.SINGLETON);
View Full Code Here

 
  public AspectCollectorImpl(TypeOracle typeOracle){
    this.typeOracle = typeOracle;
   
    for (JClassType classType : typeOracle.getTypes()) {
      Aspect aspect = classType.getAnnotation(org.aspectj.lang.annotation.Aspect.class);
      if (aspect != null){
        aspectClasses.add(classType);
      }
    }
   
View Full Code Here

 
  protected Object getAspectInstance(ClassType classType){
    Object result = singletonAspects.get(classType);
   
    if (result == null){
      Aspect annotation = classType.getAnnotation(Aspect.class);
      if (annotation != null){
        if ((annotation.value() == "") || ("singleton".equalsIgnoreCase(annotation.value().toString()))){
          result = classType.findConstructor(new String[]{}).newInstance();
          singletonAspects.put(classType, result);
        }
        else
          throw new RuntimeException("Now just support singleton aspect.");
View Full Code Here

TOP

Related Classes of org.aspectj.lang.annotation.Aspect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.