aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2018-10-15 09:25:27 -0700
committerAndy Clement <aclement@pivotal.io>2018-10-15 09:25:27 -0700
commita1953b55458304e99b90124925c3b7c4aa88ebe3 (patch)
tree57ee909d7586e962398160c3d25e7cb0ce9de9fc /org.aspectj.ajdt.core
parent73fda8dcbf5db6739654848fe4a0ec29ff003f7d (diff)
downloadaspectj-a1953b55458304e99b90124925c3b7c4aa88ebe3.tar.gz
aspectj-a1953b55458304e99b90124925c3b7c4aa88ebe3.zip
Merge changes for 536782
Changes contributed by Manfred under https://github.com/eclipse/org.aspectj/pull/5/commits
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java
index e43aea87c..450ffc40b 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java
@@ -57,6 +57,9 @@ import org.aspectj.weaver.patterns.TypePatternList;
*/
public class AsmElementFormatter {
+ private final static String ASPECTJ_ANNOTATION_PACKAGE = "org.aspectj.lang.annotation";
+ private final static char PACKAGE_INITIAL_CHAR = ASPECTJ_ANNOTATION_PACKAGE.charAt(0);
+
public void genLabelAndKind(MethodDeclaration methodDeclaration, IProgramElement node) {
if (methodDeclaration instanceof AdviceDeclaration) {
@@ -219,7 +222,7 @@ public class AsmElementFormatter {
// Note: AV: implicit single advice type support here (should be enforced somewhere as well (APT etc))
Annotation annotation = methodDeclaration.annotations[i];
String annotationSig = new String(annotation.type.getTypeBindingPublic(methodDeclaration.scope).signature());
- if (annotationSig.charAt(1) == 'o') {
+ if (annotationSig.charAt(1) == PACKAGE_INITIAL_CHAR) {
if ("Lorg/aspectj/lang/annotation/Pointcut;".equals(annotationSig)) {
node.setKind(IProgramElement.Kind.POINTCUT);
node.setAnnotationStyleDeclaration(true); // pointcuts don't seem to get handled quite right...
@@ -459,7 +462,7 @@ public class AsmElementFormatter {
// TODO: fix this way of determing ajc-added arguments, make subtype of Argument with extra info
private boolean acceptArgument(String name, String type) {
- if (name.charAt(0) != 'a' && type.charAt(0) != 'o') {
+ if (name.charAt(0) != 'a' && type.charAt(0) != PACKAGE_INITIAL_CHAR) {
return true;
}
return !name.startsWith("ajc$this_") && !type.equals("org.aspectj.lang.JoinPoint.StaticPart")