aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authoraclement <aclement>2009-02-24 19:17:27 +0000
committeraclement <aclement>2009-02-24 19:17:27 +0000
commit57d21ed5c724ff0b123aeef34875f8786cb21d36 (patch)
tree6fc3532d9a075a052130ba20aa27d13f4ae221ee /org.aspectj.matcher
parent303c8c22c537a4c64ced3c0d83cc92f110e60001 (diff)
downloadaspectj-57d21ed5c724ff0b123aeef34875f8786cb21d36.tar.gz
aspectj-57d21ed5c724ff0b123aeef34875f8786cb21d36.zip
265729: fault in binary aspects for itds/decps and search for them correctly
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java2
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java2
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/UnresolvedType.java46
3 files changed, 33 insertions, 17 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
index f27e48806..dd3335c41 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@@ -747,7 +747,7 @@ public class ReferenceType extends ResolvedType {
return declares;
}
- protected Collection getTypeMungers() {
+ public Collection getTypeMungers() {
return delegate.getTypeMungers();
}
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
index 0479420ea..84b58f8bc 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
@@ -665,7 +665,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
return Collections.EMPTY_LIST;
}
- protected Collection getTypeMungers() {
+ public Collection getTypeMungers() {
return Collections.EMPTY_LIST;
}
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/UnresolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/UnresolvedType.java
index 0c666cac8..43ba641d4 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/UnresolvedType.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/UnresolvedType.java
@@ -119,6 +119,16 @@ public class UnresolvedType implements Traceable, TypeVariableDeclaringElement {
protected String signature;
/**
+ * Calculated on first request - the package name (java.lang for type java.lang.String)
+ */
+ private String packageName;
+
+ /**
+ * Calculated on first request - the class name (String for type java.lang.String)
+ */
+ private String className;
+
+ /**
* The erasure of the signature. Contains only the Java signature of the type with all supertype, superinterface, type variable,
* and parameter information removed.
*/
@@ -831,16 +841,19 @@ public class UnresolvedType implements Traceable, TypeVariableDeclaringElement {
}
public String getPackageName() {
- String name = getName();
- if (name.indexOf("<") != -1) {
- name = name.substring(0, name.indexOf("<"));
- }
- int index = name.lastIndexOf('.');
- if (index == -1) {
- return "";
- } else {
- return name.substring(0, index);
+ if (packageName == null) {
+ String name = getName();
+ if (name.indexOf("<") != -1) {
+ name = name.substring(0, name.indexOf("<"));
+ }
+ int index = name.lastIndexOf('.');
+ if (index == -1) {
+ packageName = "";
+ } else {
+ packageName = name.substring(0, index);
+ }
}
+ return packageName;
}
public UnresolvedType[] getTypeParameters() {
@@ -851,13 +864,16 @@ public class UnresolvedType implements Traceable, TypeVariableDeclaringElement {
* Doesn't include the package
*/
public String getClassName() {
- String name = getName();
- int index = name.lastIndexOf('.');
- if (index == -1) {
- return name;
- } else {
- return name.substring(index + 1);
+ if (className == null) {
+ String name = getName();
+ int index = name.lastIndexOf('.');
+ if (index == -1) {
+ className = name;
+ } else {
+ className = name.substring(index + 1);
+ }
}
+ return className;
}
public TypeVariable[] getTypeVariables() {