2.5.3 and above gets from annotation attribute otherwise self
325644
private static ClassNode getSerializeClass(ClassNode alias) {
        List<AnnotationNode> annotations = alias.getAnnotations(ClassHelper.make(AnnotationCollector.class));
        if (!annotations.isEmpty()) {
            AnnotationNode annotationNode = annotations.get(0);
            Expression member = annotationNode.getMember("serializeClass");
            if (member instanceof ClassExpression) {
                ClassExpression ce = (ClassExpression) member;
                if (!ce.getType().getName().equals(AnnotationCollector.class.getName())) {
                    alias = ce.getType();
                }
            }
        }
        return alias;
    }
225520
public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
        Annotation value = annotations.get(annotationType);
        return annotationType.cast(value);
    }
1055795
function Annotations( parent ) {

	// INSTANCE ATTRIBUTES //

	this._parent = parent;
	this._root = undefined;
	this._children = {};
	this._config = {
		'position': {
			'left': 0,
			'top': 0
		}
	};

	// REGISTER //
	if ( parent._config.hasOwnProperty( 'annotations' )  ) {
		parent._config.annotations.push( this._config );
	} else {
		parent._config.annotations = [ this._config ];
	}
	if ( parent._children.hasOwnProperty( 'annotations' ) ) {
		parent._children.annotations.push( this );
	} else {
		parent._children.annotations = [ this ];
	}

	return this;
}
265028
function _checkAnnotation (op) {
      switch (op.type) {
        case 'create':
        case 'delete': {
          let node = op.val
          if (node.hasOwnProperty('start') && node.start.path) {
            updated[getKeyForPath(node.start.path)] = true
          }
          if (node.hasOwnProperty('end') && node.end.path) {
            updated[getKeyForPath(node.end.path)] = true
          }
          break
        }
        case 'update':
        case 'set': {
          // HACK: detecting annotation changes in an opportunistic way
          let node = doc.get(op.path[0])
          if (node) {
            if (node.isPropertyAnnotation()) {
              updated[getKeyForPath(node.start.path)] = true
            } else if (node.isContainerAnnotation()) {
              affectedContainerAnnos.push(node)
            }
          }
          break
        }
        default:
          /* istanbul ignore next */
          // NOP
      }
    }
1210826
private void extractAnnotation() {
		for (Class<? extends IFile> clazz : LISTE_CLASS) {

			Map<ITag, AnnotationData> maps = new HashMap<ITag, AnnotationData>();
			Set<AnnotationData> set = new TreeSet<AnnotationData>();

			Field[] fields = clazz.getDeclaredFields();
			for (Field field : fields) {
				AnnotationData param = new AnnotationData();
				field.setAccessible(true);
				param.setField(field);
				Data annotation = field.getAnnotation(Data.class);
				if (annotation != null) {
					param.initFromAnnotation(annotation);
					maps.put(param.getTag(), param);
					try {
						set.add((AnnotationData) param.clone());
					} catch (CloneNotSupportedException e) {
						// do nothing
					}
				}
			}
			mapSet.put(clazz.getName(), set);
			map.put(clazz.getName(), maps);
		}
	}
990151
static void extractString(Elements elementUtils, Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attribute, OnAttributeFoundListener listener) {
		extractAttributeValue(elementUtils, item, annotationClass.getCanonicalName(), attribute, listener);
	}
852399
function Title( annotations ) {

	// INSTANCE ATTRIBUTES //

	this._parent = annotations;
	this._root = undefined;
	this._children = {};
	this._config = {
		'width': 200,
		'height': 28,
		'position': {
			'left': 0,
			'top': 0
		},
		'text': ''
	};

	// REGISTER //
	if ( annotations._config.hasOwnProperty( 'title' )  ) {
		annotations._config.title.push( this._config );
	} else {
		annotations._config.title = [ this._config ];
	}
	if ( annotations._children.hasOwnProperty( 'title' ) ) {
		annotations._children.title.push( this );
	} else {
		annotations._children.title = [ this ];
	}

	return this;
}
127163
private void bindTypeAnnotations()
    {
        // TODO:: need to check @Embeddable attributes as well!

        // TODO:: need to Handle association override in
        // RelationMetadataProcessor.

        for (Class<? extends Annotation> ann : validJPAAnnotations)
        {
            if (getJavaType().isAnnotationPresent(ann))
            {
                checkForValid();

                Annotation annotation = getJavaType().getAnnotation(ann);

                if (ann.isAssignableFrom(AttributeOverride.class))
                {
                    bindAttribute(annotation);
                }
                else if (ann.isAssignableFrom(AttributeOverrides.class))
                {

                    AttributeOverride[] attribAnns = ((AttributeOverrides) annotation).value();

                    for (AttributeOverride attribOverann : attribAnns)
                    {
                        bindAttribute(attribOverann);
                    }

                }

            }
        }
    }
822361
public static Annotation getAnnotation(Properties attributes) {
		float llx = 0, lly = 0, urx = 0, ury = 0;
		String value;

		value = attributes.getProperty(ElementTags.LLX);
		if (value != null) {
			llx = Float.parseFloat(value + "f");
		}
		value = attributes.getProperty(ElementTags.LLY);
		if (value != null) {
			lly = Float.parseFloat(value + "f");
		}
		value = attributes.getProperty(ElementTags.URX);
		if (value != null) {
			urx = Float.parseFloat(value + "f");
		}
		value = attributes.getProperty(ElementTags.URY);
		if (value != null) {
			ury = Float.parseFloat(value + "f");
		}

		String title = attributes.getProperty(ElementTags.TITLE);
		String text = attributes.getProperty(ElementTags.CONTENT);
		if (title != null || text != null) {
			return new Annotation(title, text, llx, lly, urx, ury);
		}
		value = attributes.getProperty(ElementTags.URL);
		if (value != null) {
			return new Annotation(llx, lly, urx, ury, value);
		}
		value = attributes.getProperty(ElementTags.NAMED);
		if (value != null) {
			return new Annotation(llx, lly, urx, ury, Integer.parseInt(value));
		}
		String file = attributes.getProperty(ElementTags.FILE);
		String destination = attributes.getProperty(ElementTags.DESTINATION);
		String page = (String) attributes.remove(ElementTags.PAGE);
		if (file != null) {
			if (destination != null) {
				return new Annotation(llx, lly, urx, ury, file, destination);
			}
			if (page != null) {
				return new Annotation(llx, lly, urx, ury, file, Integer
						.parseInt(page));
			}
		}
		return new Annotation("", "", llx, lly, urx, ury);
	}
948067
function handleAttributeContext(attrNode, context) {
    if (!attrNode.type && attrNode.inherit !== 'inherit') attrNode.type = 'string';

    if (attrNode.map) {
        Object.keys(attrNode.map).forEach(mappingName => {
            const mapping = attrNode.map[mappingName];

            Object.keys(mapping).forEach(dataSourceName => {
                if (!context.dataSourceAttributes[dataSourceName]) {
                    throw new ImplementationError(
                        `Unknown DataSource "${dataSourceName}" in map${context.errorContext}`
                    );
                }

                context.dataSourceAttributes[dataSourceName].push(mapping[dataSourceName]);
            });
        });

        if ('value' in attrNode) {
            throw new ImplementationError(
                'Static "value" in combination with "map" makes no sense' + context.errorContext
            );
        }
    }
}
813191
public Annotation asAnnotation() {
      if (this instanceof Annotation) {
         return Cast.as(this);
      } else if (document() != null) {
         return document()
                   .annotationBuilder()
                   .type(AnnotationType.ROOT)
                   .bounds(this)
                   .attributes(this)
                   .createDetached();
      }
      return Fragments.detachedAnnotation(AnnotationType.ROOT, start(), end());
   }
971721
def get_annotation(component, db_name, db_ref):
    
    url = get_identifiers_url(db_name, db_ref)
    if not url:
        return None
    subj = component
    ann = Annotation(subj, url, 'is')
    return ann
579549
private void visitAnnotationAttributes(AnnotationNode an, AnnotationVisitor av) {
        Map<String, Object> constantAttrs = new HashMap<String, Object>();
        Map<String, PropertyExpression> enumAttrs = new HashMap<String, PropertyExpression>();
        Map<String, Object> atAttrs = new HashMap<String, Object>();
        Map<String, ListExpression> arrayAttrs = new HashMap<String, ListExpression>();

        for (String name : an.getMembers().keySet()) {
            Expression expr = an.getMember(name);
            if (expr instanceof AnnotationConstantExpression) {
                atAttrs.put(name, ((AnnotationConstantExpression) expr).getValue());
            } else if (expr instanceof ConstantExpression) {
                constantAttrs.put(name, ((ConstantExpression) expr).getValue());
            } else if (expr instanceof ClassExpression) {
                constantAttrs.put(name,
                        Type.getType(BytecodeHelper.getTypeDescription((expr.getType()))));
            } else if (expr instanceof PropertyExpression) {
                enumAttrs.put(name, (PropertyExpression) expr);
            } else if (expr instanceof ListExpression) {
                arrayAttrs.put(name, (ListExpression) expr);
            } else if (expr instanceof ClosureExpression) {
                ClassNode closureClass = controller.getClosureWriter().getOrAddClosureClass((ClosureExpression) expr, ACC_PUBLIC);
                constantAttrs.put(name,
                        Type.getType(BytecodeHelper.getTypeDescription(closureClass)));
            }
        }

        for (Map.Entry entry : constantAttrs.entrySet()) {
            av.visit((String) entry.getKey(), entry.getValue());
        }
        for (Map.Entry entry : enumAttrs.entrySet()) {
            PropertyExpression propExp = (PropertyExpression) entry.getValue();
            av.visitEnum((String) entry.getKey(),
                    BytecodeHelper.getTypeDescription(propExp.getObjectExpression().getType()),
                    String.valueOf(((ConstantExpression) propExp.getProperty()).getValue()));
        }
        for (Map.Entry entry : atAttrs.entrySet()) {
            AnnotationNode atNode = (AnnotationNode) entry.getValue();
            AnnotationVisitor av2 = av.visitAnnotation((String) entry.getKey(),
                    BytecodeHelper.getTypeDescription(atNode.getClassNode()));
            visitAnnotationAttributes(atNode, av2);
            av2.visitEnd();
        }
        visitArrayAttributes(an, arrayAttrs, av);
    }
722572
private String getAnnotationValue(Annotation annotation) {
        Class<? extends Annotation> type = annotation.annotationType();
        try {
            Method method = type.getDeclaredMethod(VALUE);
            return String.valueOf(method.invoke(annotation, NO_ARGS));
        } catch (NoSuchMethodException e) {
            return null;
        } catch (InvocationTargetException e) {
            return null;
        } catch (IllegalAccessException e) {
            return null;
        }
    }
725256
public static Object getAnnotationAttribute(final Annotation annotation, final String attributeName) {
        Object object = null;
        try {
            // Get the annotation method for the given name
            final Method attributeMethod = annotation.annotationType().getDeclaredMethod(attributeName);

            // Call the method to gets the value
            object = attributeMethod.invoke(annotation);

        } catch (NoSuchMethodException | SecurityException e) {
            LOGGER.log(NO_ANNOTATION_PROPERTY, e, attributeName);
        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
            LOGGER.log(NO_ANNOTATION_PROPERTY_VALUE, e, attributeName);
        }
        return object;
    }
1112617
public static String extractAsString(final Element item, final Class<? extends Annotation> annotationClass, final AnnotationAttributeType attributeName) {
		final Elements elementUtils=BaseProcessor.elementUtils;
		
		final One<String> result = new One<String>();

		extractString(elementUtils, item, annotationClass, attributeName, new OnAttributeFoundListener() {

			@Override
			public void onFound(String value) {
				List<String> list = AnnotationUtility.extractAsArrayOfString(value);

				if (list.size() > 0)
					result.value0 = list.get(0);
				else
					result.value0 = value;							
			}
		});

		return result.value0;
	}
1206812
private void readJSR303Annotations(UIComponent component) {
		coreExpression = ELTools.getCoreValueExpression(component);
		Annotation[] annotations = ELTools.readAnnotations(component);
		if (null != annotations) {
			for (Annotation a : annotations) {
				if (a instanceof Max) {
					long maximum = ((Max) a).value();
					max = maximum;
					hasMax = true;
				} else if (a instanceof Min) {
					long minimum = ((Min) a).value();
					hasMin = true;
					min = minimum;
				} else if (a instanceof Size) {
					maxSize = ((Size) a).max();
					hasMaxSize = maxSize > 0;
					minSize = ((Size) a).min();
					hasMinSize = minSize > 0;
				} else if (a instanceof NotNull) {
					isRequired = true;
				}
			}
		}

		clazz = ELTools.getType(component);
		if ((clazz == Integer.class) || (clazz == int.class)
				|| (clazz == Byte.class) || (clazz == byte.class)
				|| (clazz == Short.class) || (clazz == short.class)
				|| (clazz == Long.class) || (clazz == long.class)) {
			isInteger = true;
			isNumeric = true;
		} else if ((clazz == Double.class) || (clazz == double.class)
				|| (clazz == Float.class) || (clazz == float.class)) {
			isFloat = true;
			isNumeric = true;
		} else if ((clazz==Date.class) || (clazz==java.util.Date.class)) {
			isDate=true;
		}
	}