public int[] extractAnnotationResIdValueParameter(Element element, String annotationName, String fieldName) { /* * Annotation value() parameter can be an int or an int[] */ Object annotationValue = extractAnnotationParameter(element, annotationName, fieldName); if (annotationValue == null) { // This case happened during refactoring, if the id has been changed // in the layout and compiler throws an error on the annotation // because the constant doesn't exists anymore return new int[0]; } int[] values; if (annotationValue.getClass().isArray()) { values = (int[]) annotationValue; } else { values = new int[1]; values[0] = (Integer) annotationValue; } return values; }
public List<String> extractAnnotationResources(Element element, String annotationName, IRInnerClass rInnerClass, boolean useElementName, String idFieldName, String resFieldName) { int[] values = extractAnnotationResIdValueParameter(element, annotationName, idFieldName);
public int[] extractAnnotationResIdValueParameter(Element element, String annotationName, String fieldName) { /* * Annotation value() parameter can be an int or an int[] */ Object annotationValue = extractAnnotationParameter(element, annotationName, fieldName); if (annotationValue == null) { // This case happened during refactoring, if the id has been changed // in the layout and compiler throws an error on the annotation // because the constant doesn't exists anymore return new int[0]; } int[] values; if (annotationValue.getClass().isArray()) { values = (int[]) annotationValue; } else { values = new int[1]; values[0] = (Integer) annotationValue; } return values; }
public List<String> extractAnnotationResources(Element element, String annotationName, IRInnerClass rInnerClass, boolean useElementName, String idFieldName, String resFieldName) { int[] values = extractAnnotationResIdValueParameter(element, annotationName, idFieldName);