diff options
author | Andy Clement <aclement@gopivotal.com> | 2014-11-05 08:27:45 -0800 |
---|---|---|
committer | Andy Clement <aclement@gopivotal.com> | 2014-11-05 08:27:45 -0800 |
commit | 11fba64f400694713cc6571c97e194eaf3b99f40 (patch) | |
tree | 0c7501ff355c8caaecc2009864a423ad37d036e4 /org.aspectj.matcher | |
parent | e91fcabde7a38787ac03b5f98c6588aa8b3e411c (diff) | |
download | aspectj-11fba64f400694713cc6571c97e194eaf3b99f40.tar.gz aspectj-11fba64f400694713cc6571c97e194eaf3b99f40.zip |
Fix 449739: support is(FinalType)
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java | 2 | ||||
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java index 6bcb4ce4a..106376aad 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java @@ -1064,6 +1064,8 @@ public class PatternParser { typeIsPattern = new TypeCategoryTypePattern(TypeCategoryTypePattern.ENUM); } else if (category.equals("AnnotationType")) { typeIsPattern = new TypeCategoryTypePattern(TypeCategoryTypePattern.ANNOTATION); + } else if (category.equals("FinalType")) { + typeIsPattern = new TypeCategoryTypePattern(TypeCategoryTypePattern.FINAL); } } if (typeIsPattern == null) { diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java index 9f565b20d..72efea400 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java @@ -14,6 +14,7 @@ package org.aspectj.weaver.patterns; import java.io.IOException; +import java.lang.reflect.Modifier; import java.util.Map; import org.aspectj.util.FuzzyBoolean; @@ -40,6 +41,7 @@ public class TypeCategoryTypePattern extends TypePattern { public static final int ANONYMOUS = 5; public static final int ENUM = 6; public static final int ANNOTATION = 7; + public static final int FINAL = 8; private int category; @@ -104,6 +106,7 @@ public class TypeCategoryTypePattern extends TypePattern { writeLocation(s); } + @SuppressWarnings("unused") public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException { int version = s.readInt(); int category = s.readInt(); @@ -131,6 +134,8 @@ public class TypeCategoryTypePattern extends TypePattern { return type.isEnum(); case ANNOTATION: return type.isAnnotation(); + case FINAL: + return Modifier.isFinal(type.getModifiers()); } return false; } |