*
* @param attribute
* @return the RuntimeInvisibleAnnotations to add Annotation to
*/
public static RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(final Attribute attribute) {
RuntimeInvisibleAnnotations runtimeInvisibleAnnotations = null;
Attribute lastAttribute = attribute;
for (Attribute loop = attribute; loop != null; loop = loop.next) {
lastAttribute = loop;
if (loop instanceof RuntimeInvisibleAnnotations) {
return runtimeInvisibleAnnotations = (RuntimeInvisibleAnnotations) loop;
}
}
// not found, link a new one to lastAttribute
runtimeInvisibleAnnotations = new RuntimeInvisibleAnnotations();
runtimeInvisibleAnnotations.next = null;
if (attribute != null) {
// if arg is null, we are just adding this annotation as the sole attribute
lastAttribute.next = runtimeInvisibleAnnotations;
} else {