From 450c1fe05731c1084bfabb22d7595f39ac19b8c6 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 19 Nov 2018 09:15:58 -0800 Subject: Fix 541325 - Support is(AbstractType) --- org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java | 2 ++ .../src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java | 3 +++ 2 files changed, 5 insertions(+) (limited to 'org.aspectj.matcher') 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 106376aad..f3bf08833 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PatternParser.java @@ -1066,6 +1066,8 @@ public class PatternParser { typeIsPattern = new TypeCategoryTypePattern(TypeCategoryTypePattern.ANNOTATION); } else if (category.equals("FinalType")) { typeIsPattern = new TypeCategoryTypePattern(TypeCategoryTypePattern.FINAL); + } else if (category.equals("AbstractType")) { + typeIsPattern = new TypeCategoryTypePattern(TypeCategoryTypePattern.ABSTRACT); } } 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 72efea400..80ffc7556 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java @@ -42,6 +42,7 @@ public class TypeCategoryTypePattern extends TypePattern { public static final int ENUM = 6; public static final int ANNOTATION = 7; public static final int FINAL = 8; + public static final int ABSTRACT = 9; private int category; @@ -136,6 +137,8 @@ public class TypeCategoryTypePattern extends TypePattern { return type.isAnnotation(); case FINAL: return Modifier.isFinal(type.getModifiers()); + case ABSTRACT: + return Modifier.isAbstract(type.getModifiers()); } return false; } -- cgit v1.2.3