Get attribute name from annotation {@link Attribute}

@param fieldName
@param annot
@return
509767
static String getAttributeName(final String fieldName, final Attribute annot) {
        String attributeName = null;
        if (annot.name().equals("")) {
            attributeName = fieldName;
        } else {
            attributeName = annot.name();
        }
        return attributeName;
    }
1186736
public IAttributeBehavior getAttribute(final String attributeName) {
        AttributeImpl attr = dynamicAttributes.get(attributeName.toLowerCase(Locale.ENGLISH));
        if (attr == null) return null;
        else return attr.getBehavior();
    }
33016
public static IAnnotationBinding getAnnotationBinding(
            IAnnotationBinding[] annotations, String annotationClassName) {
        if (annotations == null) {
            return null;
        }
        if (annotationClassName == null) {
            throw new NullPointerException();
        }

        for (IAnnotationBinding annotation : annotations) {
            String qName = annotation.getAnnotationType().getBinaryName();
            assert qName != null;
            // TODO if multiple annotations for annotationClassName exists
            if (qName.equals(annotationClassName)) {
                return annotation;
            }
        }
        return null;
    }
148912
@Nullable
	public String getValueFrom(Annotation annotation) {

		Assert.notNull(annotation, "Annotation must not be null!");
		return (String) (attributeName == null ? AnnotationUtils.getValue(annotation) : AnnotationUtils.getValue(
				annotation, attributeName));
	}
890076
public Attribute getAttribute(String name)
  {
    for (int i = _attributes.size() - 1; i >= 0; i--) {
      Attribute attr = _attributes.get(i);

      if (attr.getName().equals(name))
        return attr;
    }

    return null;
  }
1323224
private static List<Map<String, Object>> getEntityAnnos(Object targetClass, String annotationName) {
		Annotation[] anno = null;
		if (targetClass instanceof Field)
			anno = ((Field) targetClass).getAnnotations();
		else
			anno = ((Class<?>) targetClass).getAnnotations();
		List<Map<String, Object>> l = new ArrayList<Map<String, Object>>();
		for (Annotation annotation : anno) {
			Class<? extends Annotation> type = annotation.annotationType();
			String cName = type.getName();
			if (matchNameCheck(annotationName, cName)) {
				l.add(changeAnnotationValuesToMap(annotation, type));
			}
		}
		return l;
	}
131814
private boolean processAttributeAnnotation(Field field) {
        // Default to no syntax specified
        syntax = "";
        
        // Default to a String based attribute
        isBinary = false;
        
        // Default name of attribute to the name of the field
        name = new CaseIgnoreString(field.getName());
        
        // We have not yet found the @Attribute annotation
        boolean foundAnnotation=false;
        
        // Grab the @Attribute annotation
        Attribute attribute = field.getAnnotation(Attribute.class);

        List<String> attrList = new ArrayList<String>();
        // Did we find the annotation?
        if (attribute != null) {
            // Pull attribute name, syntax and whether attribute is binary
            // from the annotation 
            foundAnnotation=true;
            String localAttributeName = attribute.name();
            // Would be more efficient to use !isEmpty - but that then makes us Java 6 dependent
            if (localAttributeName != null && localAttributeName.length()>0) {
                name = new CaseIgnoreString(localAttributeName);
                attrList.add(localAttributeName);
            }
            syntax = attribute.syntax();
            isBinary = attribute.type() == Attribute.Type.BINARY;
            isReadOnly = attribute.readonly();
        }
        attributes = attrList.toArray(new String[attrList.size()]);
        
        isObjectClass=name.equals(OBJECT_CLASS_ATTRIBUTE_CI);
        
        return foundAnnotation;
    }
709838
public boolean getAttributeAsBoolean(AnnotationAttributeType attribute) {
		String temp = attributes.get(attribute.getValue());

		return Boolean.parseBoolean(temp);
	}
653336
def getAttributeName(self, name):
        '''
        '''
        if self.func_aname is None:
            return name
        assert callable(self.func_aname), \
            'expecting callable method for attribute func_aname, not %s' %type(self.func_aname)
        f = self.func_aname
        return f(name)
296281
String getCppName(Field field) {
        ClassMapping mapping = mappings.get(field.getDeclaringClass());

        if (mapping != null) {
            Wrappe wrappedField = mapping.getStaticFields().findWrappe(field.getName());
            if (wrappedField != null && !Utils.isNullOrEmpty(wrappedField.getCppName())) {
                return wrappedField.getCppName();
            }
        }
        Java4CppWrappe annot = field.getAnnotation(Java4CppWrappe.class);
        if (annot != null && !Utils.isNullOrEmpty(annot.value())) {
            return annot.value();
        }
        return mappings.escapeName(field.getName());
    }
1149325
protected AnnotationAttributes getAttributes(AnnotationMetadata metadata) {
		String name = getAnnotationClass().getName();
		AnnotationAttributes attributes = AnnotationAttributes
				.fromMap(metadata.getAnnotationAttributes(name, true));
		Assert.notNull(attributes,
				() -> "No auto-configuration attributes found. Is "
						+ metadata.getClassName() + " annotated with "
						+ ClassUtils.getShortName(name) + "?");
		return attributes;
	}
277068
public Object getAttribute(String attributeName) {

        if (m_attributeMap == null) {
            return null;
        }
        return m_attributeMap.get(attributeName);
    }
502782
public static int extractAsInt(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attributeName) {
		final Elements elementUtils=BaseProcessor.elementUtils;
		final One<Integer> result = new One<Integer>();
		result.value0 = 0;

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

			@Override
			public void onFound(String value) {
				result.value0 = Integer.parseInt(value);
			}
		});

		return result.value0;
	}
330680
public List<String> getAttributeAsArray(AnnotationAttributeType attribute) {
		String temp = attributes.get(attribute.getValue());

		return AnnotationUtility.extractAsArrayOfString(temp);
	}
27657
static Pair<String, Integer> getId(Annotation annot) {

		if (annot instanceof DictTerm) {
			DictTerm dt = (DictTerm) annot;
			String[] split = dt.getEntityId().split(":");
			return Pair.of(split[0], parseInt(split[1]));

			// } else if (annot instanceof Measure) {
			// Measure m = (Measure) annot;
			// return Pair.of(""+m.getNormalizedUnit(), parseInt(split[1]));

		} else
			throw new RuntimeException("NOT IMPLEMENTED xxx");// FIXME
	}
845019
public final String getAttribute(String name)
	{
		synchronized (attributes) {
			for (final Iterator i = attributes.iterator(); i.hasNext();) {
				final Attribute a = (Attribute) i.next();
				if (a.getName().equals(name))
					return a.getValue();
			}
		}
		return null;
	}
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;
	}