Browse Source

Declare annotation: added getAnnotation/addAnnotation to the RTX hierarchy

tags/V1_5_0M2
aclement 19 years ago
parent
commit
1c7ba5bdaa
1 changed files with 26 additions and 1 deletions
  1. 26
    1
      weaver/src/org/aspectj/weaver/ResolvedTypeX.java

+ 26
- 1
weaver/src/org/aspectj/weaver/ResolvedTypeX.java View File

@@ -529,6 +529,21 @@ public abstract class ResolvedTypeX extends TypeX implements AnnotatedElement {
return false;
}
/**
* Note: Only overridden by Name subtype
*/
public void addAnnotation(AnnotationX annotationX) {
throw new RuntimeException("ResolvedTypeX.addAnnotation() should never be called");
}
/**
* Note: Only overridden by Name subtype
*/
public AnnotationX[] getAnnotations() {
throw new RuntimeException("ResolvedTypeX.getAnnotations() should never be called");
}

/**
* Note: Only overridden by Name subtype.
*/
@@ -626,6 +641,13 @@ public abstract class ResolvedTypeX extends TypeX implements AnnotatedElement {
return delegate.isClass();
}

public AnnotationX[] getAnnotations() {
return delegate.getAnnotations();
}
public void addAnnotation(AnnotationX annotationX) {
delegate.addAnnotation(annotationX);
}
public boolean hasAnnotation(TypeX ofType) {
return delegate.hasAnnotation(ofType);
}
@@ -789,7 +811,8 @@ public abstract class ResolvedTypeX extends TypeX implements AnnotatedElement {
this.exposedToWeaver = exposedToWeaver;
}
public final boolean isClass() {

public final boolean isClass() {
return !isAspect() && !isInterface();
}
@@ -799,6 +822,8 @@ public abstract class ResolvedTypeX extends TypeX implements AnnotatedElement {
public abstract boolean isAnnotation();
public abstract boolean isAnnotationWithRuntimeRetention();
public abstract AnnotationX[] getAnnotations();
public abstract void addAnnotation(AnnotationX annotationX);
public abstract boolean hasAnnotation(TypeX ofType);
public abstract ResolvedTypeX[] getAnnotationTypes();


Loading…
Cancel
Save