ラベルの位置を取得する。
@param anno アノテーションの情報
@return ラベルの位置。見つからない場合は、空を返す。
ただし、見つからない場合、設定により例外をスローする場合がある。
433160
private Optional<CellPosition> getLabelPosition(final AnnotationProxy anno) {

        if(Utils.isNotEmpty(anno.label())) {
            // 属性「label」によるラベルの指定がある場合
            try {
                if(Utils.isNotEmpty(anno.headerLabel())){
                    Cell headerCell = CellFinder.query(sheet, anno.headerLabel(), config).findWhenNotFoundException();
                    Cell labelCell = CellFinder.query(sheet, anno.label(), config)
                            .startPosition(headerCell.getColumnIndex(), headerCell.getRowIndex() + 1)
                            .findWhenNotFoundException();
                    return Optional.of(CellPosition.of(labelCell));

                } else {
                    Cell labelCell = CellFinder.query(sheet, anno.label(), config).findWhenNotFoundException();
                    return Optional.of(CellPosition.of(labelCell));
                }
            } catch(CellNotFoundException ex){
                if(anno.optional()){
                    return Optional.empty();
                } else {
                    throw ex;
                }
            }

        } else {
            /*
             * 属性「labelRow」「labelColumn」によるアドレスを直接指定の場合
             * これは、アノテーション @XlsIterateTables の中で指定しているときに設定される。
             */
            if(anno.labelRow() < 0) {
                throw new AnnotationInvalidException(anno.getTarget(), MessageBuilder.create("anno.attr.min")
                        .var("property", field.getNameWithClass())
                        .varWithAnno("anno", anno.annotationType())
                        .var("attrName", "labelRow")
                        .var("attrValue", anno.labelRow())
                        .var("min", 0)
                        .format());
            }

            if(anno.labelColumn() < 0) {
                throw new AnnotationInvalidException(anno.getTarget(), MessageBuilder.create("anno.attr.min")
                        .var("property", field.getNameWithClass())
                        .varWithAnno("anno", anno.annotationType())
                        .var("attrName", "labelColumn")
                        .var("attrValue", anno.labelColumn())
                        .var("min", 0)
                        .format());

            }

            return Optional.of(CellPosition.of(anno.labelRow(), anno.labelColumn()));
        }

    }
249917
@SuppressWarnings("rawtypes")
    private boolean hasGroups(final Annotation anno, final Class<?>... groups) {
        
        final Optional<Class[]> targetGroups = Utils.getAnnotationAttribute(anno, "groups", Class[].class);
        
        if(!targetGroups.isPresent()) {
            // groups属性を持たない場合
            return false;
            
        }
        
        if(groups.length == 0) {
            if(targetGroups.get().length == 0) {
                // グループの指定がない場合は、デフォルトグループとして処理。
                return true;
                
            } else {
                for(Class<?> targetGroup : targetGroups.get()) {
                    if(targetGroup.equals(DefaultGroup.class)) {
                        // デフォルトを直接指定している場合に、グループと一致。
                        return true;
                    }
                }
            }
            
        } else {
            // グループの指定がある場合
            for(Class<?> group : groups) {
                
                if(group.equals(DefaultGroup.class) && targetGroups.get().length == 0) {
                    // フィールド側にグループの指定がない場合は、デフォルトグループとして処理する。
                    return true;
                }
                
                for(Class<?> targetGroup : targetGroups.get()) {
                    // 一致するグループを持つか判定する。
                    if(targetGroup.equals(group)) {
                        return true;
                    }
                }
                
            }
            
        }
        
        return false;
        
    }
680517
public static boolean containsBuildCase(final Annotation anno, final BuildCase buildCase) {
        
        Objects.requireNonNull(anno);
        Objects.requireNonNull(buildCase);
        
        final Optional<BuildCase[]> attrCases = getAnnotationAttribute(anno, "cases", BuildCase[].class);
        if(attrCases.isPresent()) {
            final BuildCase[] casesValue = attrCases.get();
            if(casesValue.length == 0) {
                // 値が空の配列の場合
                return true;
            }
            
            for(BuildCase value : casesValue) {
                if(value == buildCase) {
                    return true;
                }
            }
            
            return false;
        }
        
        // 属性を持たない場合
        return true;
    }
315511
@Override
    public void visit(NormalAnnotationExpr anno, ControllerModel controller) {

        //org.wisdom.api.annotations.Path (There is only one pair ->value="")
        if(anno.getName().getName().equals(ANNOTATION_PATH)){
            java.lang.String path = asString(anno.getPairs().get(0).getValue());
            controller.setBasePath(path);
        }
    }
930527
private MathContext createMathContext(final Optional<XlsNumberConverter> convertAnno) {
        
        if(convertAnno.isPresent() && convertAnno.get().precision() > 0) {
            return new MathContext(convertAnno.get().precision(), RoundingMode.HALF_UP);
            
        } else {
            //アノテーションがない場合は、制限なし。
            return MathContext.UNLIMITED;
        }
    }
1091691
private CellPosition getCellPosition(final FieldAccessor accessor, final XlsCell anno) throws AnnotationInvalidException {

        if(Utils.isNotEmpty(anno.address())) {
            try {
                return CellPosition.of(anno.address());
            } catch(IllegalArgumentException e) {
                throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.invalidAddress")
                        .var("property", accessor.getNameWithClass())
                        .varWithAnno("anno", XlsCell.class)
                        .var("attrName", "address")
                        .var("attrValue", anno.address())
                        .format());
            }

        } else {
            if(anno.row() < 0) {
                throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.min")
                        .var("property", accessor.getNameWithClass())
                        .varWithAnno("anno", XlsCell.class)
                        .var("attrName", "row")
                        .var("attrValue", anno.row())
                        .var("min", 0)
                        .format());
            }

            if(anno.column() < 0) {
                throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.min")
                        .var("property", accessor.getNameWithClass())
                        .varWithAnno("anno", XlsCell.class)
                        .var("attrName", "column")
                        .var("attrValue", anno.column())
                        .var("min", 0)
                        .format());

            }

            return CellPosition.of(anno.row(), anno.column());
        }

    }
304168
public static Map<String, Object> getAnnotationValueMap(AnnotatedElement annotationEle, Class<? extends Annotation> annotationType) throws UtilException {
		final Annotation annotation = getAnnotation(annotationEle, annotationType);
		if (null == annotation) {
			return null;
		}

		final Method[] methods = ReflectUtil.getMethods(annotationType, new Filter<Method>() {
			@Override
			public boolean accept(Method t) {
				if (ArrayUtil.isEmpty(t.getParameterTypes())) {
					// 只读取无参方法
					final String name = t.getName();
					if ("hashCode".equals(name) || "toString".equals(name) || "annotationType".equals(name)) {
						// 跳过自有的几个方法
						return false;
					}
					return true;
				}
				return false;
			}
		});

		final HashMap<String, Object> result = new HashMap<>(methods.length, 1);
		for (Method method : methods) {
			result.put(method.getName(), ReflectUtil.invoke(annotation, method));
		}
		return result;
	}
308991
public static boolean matches(Class<? extends Annotation> anno, String consName) {
		return VALIDATORS.get(anno).equals(consName);
	}
622509
public static JCas getJCas(final Annotation annotation)
    {
        JCas result = null;
        try {
            result = annotation.getCAS().getJCas();
        }
        catch (final CASException e) {
            throw new IllegalArgumentException(e);
        }

        return result;

    }
906602
private boolean uglyHackHasGeneratedValueAnno() {
        if (useSequenceNameShortcut()) {
            return true;
        }

        if (attribute.getColumnConfig().useConfigForIdGenerator()) {
            return attribute.getColumnConfig().hasGeneratedValue();
        } else if (attribute.getAutoIncrement() == TRUE) {
            return true;
        } else if (attribute.getAutoIncrement() == FALSE && /* 32 length string are special for us */!attribute.isString()) {
            // the jdbc driver supports IS_AUTOINCREMENT metadata, great!
            return false;
        } else {
            // the jdbc driver does not support IS_AUTOINCREMENT
            // fall back to convention
            return hasIdGeneratorByConvention();
        }
    }
636287
private Link annotationToLink(Siren4JLink linkAnno, EntityContext context) {
        LinkBuilder builder = LinkBuilder.newInstance().setRelationship(linkAnno.rel()).setHref(linkAnno.href());
        if (StringUtils.isNotBlank(linkAnno.title())) {
            builder.setTitle(linkAnno.title());
        }
        if (ArrayUtils.isNotEmpty(linkAnno.linkClass())) {
            builder.setComponentClass(linkAnno.linkClass());
        }
        return builder.build();
    }
574821
public static <T>  boolean hasAnnotationAttribute(final Annotation anno, final String attrName, final Class<T> attrType) {
        
        return getAnnotationAttribute(anno, attrName, attrType).isPresent();
        
    }
1084660
public String getAnnotationLevel() {
    if (MMAXAnnotation_Type.featOkTst && ((MMAXAnnotation_Type)jcasType).casFeat_annotationLevel == null)
      jcasType.jcas.throwFeatMissing("annotationLevel", "de.julielab.jules.types.mmax.MMAXAnnotation");
    return jcasType.ll_cas.ll_getStringValue(addr, ((MMAXAnnotation_Type)jcasType).casFeatCode_annotationLevel);}
61927
private NullnessAnnotation getMethodNullnessAnnotation() {

        if (method.getSignature().indexOf(")L") >= 0 || method.getSignature().indexOf(")[") >= 0) {
            if (DEBUG_NULLRETURN) {
                System.out.println("Checking return annotation for "
                        + SignatureConverter.convertMethodSignature(classContext.getJavaClass(), method));
            }

            XMethod m = XFactory.createXMethod(classContext.getJavaClass(), method);
            return AnalysisContext.currentAnalysisContext().getNullnessAnnotationDatabase().getResolvedAnnotation(m, false);
        }
        return NullnessAnnotation.UNKNOWN_NULLNESS;
    }
468555
public List<Annotation> getAllAnnotations() {
        List<Annotation> ret = new ArrayList<Annotation>();
        for (StatementGroup sg : statementGroups) {
            ret.addAll(sg.getAllAnnotations());
        }
        return ret;
    }
590615
public final String toAnnotationString(Nullability nullability) {
    return nullability == Nullability.EXPLICIT
        ? appendAsNonNull(new StringBuilder(), true).toString()
        : appendTo(new StringBuilder(), true).toString();
  }
1103236
@SuppressWarnings("unchecked")
    public <A extends Annotation> Optional<A> getAnnotation(final Class<A> annoClass) {
        return Optional.ofNullable((A)annotationMap.get(annoClass));
    }