Browse Source

286539: test and fix (decanno type in model)

tags/PRE_J5
aclement 14 years ago
parent
commit
447cdc9d31

+ 10
- 0
asm/src/org/aspectj/asm/IProgramElement.java View File

@@ -403,4 +403,14 @@ public interface IProgramElement extends Serializable {
public void setAnnotationStyleDeclaration(boolean b);

public boolean isAnnotationStyleDeclaration();

/**
* @param fullyQualifiedannotationType the annotation type, eg. p.q.r.Foo
*/
public void setAnnotationType(String fullyQualifiedannotationType);

/**
* @return the fully qualified annotation type, eg. p.q.r.Foo
*/
public String getAnnotationType();
}

+ 17
- 0
asm/src/org/aspectj/asm/internal/ProgramElement.java View File

@@ -356,6 +356,23 @@ public class ProgramElement implements IProgramElement {
return (List) (kvpairs == null ? null : kvpairs.get("parentTypes"));
}

/**
* {@inheritDoc}
*/
public void setAnnotationType(String fullyQualifiedAnnotationType) {
if (kvpairs == Collections.EMPTY_MAP) {
kvpairs = new HashMap();
}
kvpairs.put("annotationType", fullyQualifiedAnnotationType);
}

/**
* {@inheritDoc}
*/
public String getAnnotationType() {
return (String) (kvpairs == null ? null : kvpairs.get("annotationType"));
}

public String getCorrespondingType() {
return getCorrespondingType(false);
}

Loading…
Cancel
Save