diff options
author | aclement <aclement> | 2008-10-22 05:46:20 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-10-22 05:46:20 +0000 |
commit | bfdc895ca8a69c262ac2c685be4e1fc59930954c (patch) | |
tree | 376e631be5821b62d18245a071b4122a18b974a3 /asm | |
parent | b63f780e7aaea4e693ebe1753b81c6d44888ecdc (diff) | |
download | aspectj-bfdc895ca8a69c262ac2c685be4e1fc59930954c.tar.gz aspectj-bfdc895ca8a69c262ac2c685be4e1fc59930954c.zip |
246125: the SPLIT
Diffstat (limited to 'asm')
-rw-r--r-- | asm/src/org/aspectj/asm/IRelationship.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/asm/src/org/aspectj/asm/IRelationship.java b/asm/src/org/aspectj/asm/IRelationship.java index d71a5f2b7..439c089d2 100644 --- a/asm/src/org/aspectj/asm/IRelationship.java +++ b/asm/src/org/aspectj/asm/IRelationship.java @@ -61,6 +61,25 @@ public interface IRelationship extends Serializable { || this == DECLARE_SOFT; } + public String getName() { + return name; + } + + /** + * Return the Kind of the relationship that is passed in by name. + * + * @param stringFormOfRelationshipKind the relationship name, eg. 'declare warning', 'declare error', etc. + * @return the Kind instance + */ + public static Kind getKindFor(String stringFormOfRelationshipKind) { + for (int i = 0; i < ALL.length; i++) { + if (ALL[i].name.equals(stringFormOfRelationshipKind)) { + return ALL[i]; + } + } + return null; + } + private Kind(String name) { this.name = name; } |