aboutsummaryrefslogtreecommitdiffstats
path: root/aspectj5rt/java5-src
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-10-06 17:35:51 -0700
committerAndy Clement <aclement@gopivotal.com>2014-10-06 17:35:51 -0700
commitc8e951296c5f95e82d4c7c3f8eb9b0a647014e20 (patch)
tree2eaed5b80ad735e4c91e424098e35e221f4fea44 /aspectj5rt/java5-src
parent102173fc11fc6648ed8f2283d3c5ad535e412c73 (diff)
downloadaspectj-c8e951296c5f95e82d4c7c3f8eb9b0a647014e20.tar.gz
aspectj-c8e951296c5f95e82d4c7c3f8eb9b0a647014e20.zip
Fix 436653: conditional aspect activation plus various polish
Modified test expectation system so it is possible to say the test cares about one particular message and the rest do not matter (prefix message string with '*') - crude but quick. Polished many places to exploit generics Upgraded all the tests to work on Java8 - some serious changes regarding ajdoc on Java8. Hopefully it has stayed backwards compatible with earlier JDK versions (e.g. if using AspectJ 1.8.3+ with a JDK less than 8) but no explicit testing done for this.
Diffstat (limited to 'aspectj5rt/java5-src')
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/RequiredTypes.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/RequiredTypes.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/RequiredTypes.java
new file mode 100644
index 000000000..d83b1bb73
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/RequiredTypes.java
@@ -0,0 +1,30 @@
+/* *******************************************************************
+ * Copyright (c) 2014 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ * ******************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Can be specified on an aspect to ensure that particular types must be accessible before
+ * the aspect will be 'activated'. The array value should be a list of fully qualified
+ * type names as strings, for example "com.foo.Bar". Useful in an aspect library that
+ * includes a number of aspects, only a few of which should ever be active depending
+ * upon what is on the classpath.
+ *
+ * @author Andy Clement
+ * @since 1.8.3
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface RequiredTypes {
+ String[] value();
+}