Skip to content
Snippets Groups Projects
Commit 002e7a56 authored by Tucker Gary Siegel's avatar Tucker Gary Siegel
Browse files

require edu.umd.dawn for use of annotations

parent b3db6fd2
No related branches found
Tags 0.7.4
No related merge requests found
...@@ -29,8 +29,4 @@ public class AspectBase<T extends Annotation> { ...@@ -29,8 +29,4 @@ public class AspectBase<T extends Annotation> {
((MethodSignature) jointPoint.getSignature()).getDeclaringType().getAnnotation(clazz); ((MethodSignature) jointPoint.getSignature()).getDeclaringType().getAnnotation(clazz);
} }
// protected T grabMethodArgument(ProceedingJoinPoint jointPoint, Class<T> clazz) {
// return (T)
// ((MethodSignature) jointPoint.getSignature()).getDeclaringType().getAnnotation(clazz);
// }
} }
...@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component; ...@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
@Log4j2 @Log4j2
public class DeprecatedAspect extends AspectBase<Deprecated> { public class DeprecatedAspect extends AspectBase<Deprecated> {
@Around("@annotation(Deprecated)") @Around("@annotation(Deprecated) && within(edu.umd.dawn..**)")
public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable {
Deprecated annotation = grabAnnotation(jointPoint, Deprecated.class); Deprecated annotation = grabAnnotation(jointPoint, Deprecated.class);
String descriptor = getFullDescriptor(jointPoint); String descriptor = getFullDescriptor(jointPoint);
......
...@@ -24,7 +24,7 @@ public class RoleRestrictionAspect extends AspectBase<RoleRestriction> { ...@@ -24,7 +24,7 @@ public class RoleRestrictionAspect extends AspectBase<RoleRestriction> {
@Value("${config.local}") @Value("${config.local}")
private boolean local = false; private boolean local = false;
@Around("@annotation(RoleRestriction)") @Around("@annotation(RoleRestriction) && within(edu.umd.dawn..**)")
public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable {
RoleRestriction annotation = grabAnnotation(jointPoint, RoleRestriction.class); RoleRestriction annotation = grabAnnotation(jointPoint, RoleRestriction.class);
if (!local) { if (!local) {
......
...@@ -15,7 +15,7 @@ import org.springframework.stereotype.Component; ...@@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
@Component @Component
public class TraceableAspect extends AspectBase<Traceable> { public class TraceableAspect extends AspectBase<Traceable> {
@Around("@annotation(Traceable)") @Around("@annotation(Traceable) && within(edu.umd.dawn..**)")
public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable {
Traceable traceable = grabAnnotation(jointPoint, Traceable.class); Traceable traceable = grabAnnotation(jointPoint, Traceable.class);
......
...@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component; ...@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
@Log4j2 @Log4j2
public class UnfinishedAspect extends AspectBase<Unfinished> { public class UnfinishedAspect extends AspectBase<Unfinished> {
@Around("@annotation(Unfinished)") @Around("@annotation(Unfinished) && within(edu.umd.dawn..**)")
public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable {
Unfinished unfinished = grabAnnotation(jointPoint, Unfinished.class); Unfinished unfinished = grabAnnotation(jointPoint, Unfinished.class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment