指定したパスとクラスタイプに対する{@link FieldFormatter}を取得する。
<p>ただし、リストのインデックスやキーが含まれている場合、引数「fieldPath」からそれらを取り除いた値で比較する。
<br>一致するフィールドに対するフォーマッタが見つからない場合は、タイプのみで比較する。
</p>
@param fieldPath フィールドパス。
@param requiredType 取得したいクラスタイプ
@return 見つからない場合は、nullを返す。
518410
public <T> FieldFormatter<T> findFormatter(final String fieldPath, final Class<T> requiredType) {
        
        // 完全なパスで比較
        FieldFormatter<T> formatter = getFormatter(fieldPath, requiredType);
        if(formatter != null) {
            return formatter;
        }
        
        // インデックスを除去した形式で比較
        final List<String> strippedPaths = new ArrayList<>();
        addStrippedPropertyPaths(strippedPaths, "", fieldPath);
        
        for(String strippedPath : strippedPaths) {
            formatter = getFormatter(strippedPath, requiredType);
            if(formatter != null) {
                return formatter;
            }
            
        }
        
        // 見つからない場合は、タイプのみで比較した物を取得する
        return getFormatter(requiredType);
        
        
    }
315786
@SafeVarargs
  public static <E extends Enum<E> & TemplatePathInfo> TemplatePathInfo forTemplatePath(@NotNull String templatePath,
      @NotNull Class<E> @NotNull... templateEnums) {
    if (templatePath == null || templateEnums == null) {
      return null;
    }
    for (Class<E> templateEnum : templateEnums) {
      for (E template : EnumSet.allOf(templateEnum)) {
        if (StringUtils.equals(template.getTemplatePath(), templatePath)) {
          return template;
        }
      }
    }
    return null;
  }
161572
public Optional<TypeInformation<?>> getFieldType(String fieldName) {
		if (fieldNameToIndex.containsKey(fieldName)) {
			return Optional.of(fieldTypes[fieldNameToIndex.get(fieldName)]);
		}
		return Optional.empty();
	}
623275
public DateTimeFormatterBuilder appendShortText(DateTimeFieldType fieldType) {
        if (fieldType == null) {
            throw new IllegalArgumentException("Field type must not be null");
        }
        return append0(new TextField(fieldType, true));
    }
96980
public static <T extends FieldDescription> ElementMatcher.Junction<T> fieldType(Class<?> fieldType) {
        return fieldType(TypeDescription.ForLoadedType.of(fieldType));
    }
301213
@Override
    protected TextFormatter<T> getDefaultFormatter(final FieldAccessor field, final Configuration config) {
        
        throw new SuperCsvInvalidAnnotationException(MessageBuilder.create("anno.required")
                .var("property", field.getNameWithClass())
                .varWithAnno("anno", CsvFormat.class)
                .format());
    }
1185711
public static <T extends FieldDescription> ElementMatcher.Junction<T> genericFieldType(ElementMatcher<? super TypeDescription.Generic> matcher) {
        return new FieldTypeMatcher<T>(matcher);
    }
426303
public <T> FieldFormatter<T> findFieldFormatter(final String field, final Class<T> fieldType) {
        String fieldPath = buildFieldPath(field);
        return fieldFormatterRegistry.findFormatter(fieldPath, fieldType);
    }
1131763
public void checkAllRequirementsSatisfied(final String currentPath) {
        StringBuilder errors = new StringBuilder();

        for (Field field: this.dependantsInJson) {
            final Collection<String> requirements = this.dependantToRequirementsMap.get(field);
            if (!requirements.isEmpty()) {
                errors.append("\n");
                String type = field.getType().getName();
                if (field.getType().isArray()) {
                    type = field.getType().getComponentType().getName() + "[]";
                }
                errors.append("\t* ").append(type).append(' ').append(field.getName()).append(" depends on ")
                        .append(requirements);
            }
        }
        Assert.equals(0, errors.length(),
                      "\nErrors were detected when analysing the @Requires dependencies of '" +
                              currentPath + "': " + errors);
    }
302621
private Class<?> getFieldRole(Field field, Requirement requirement)
    {
        Class<?> role;

        // Handle case of list or map
        if (isDependencyOfListType(field.getType())) {
            role = getGenericRole(field);
        } else {
            role = field.getType();
        }

        return role;
    }
151268
public void registerFieldFormatter(final String field, final Class<?> fieldType, final FieldFormatter<?> formatter) {
        
        registerFieldFormatter(field, fieldType, formatter, false);
        
    }
587286
public static Field getDeclaredFieldWithPath(Class<?> clazz, String path) {

        int lastDot = path.lastIndexOf('.');

        if (lastDot > -1) {
            String parentPath = path.substring(0, lastDot);
            String fieldName = path.substring(lastDot + 1);
            Field parentField = getDeclaredFieldWithPath(clazz, parentPath);
            return getDeclaredFieldInHierarchy(parentField.getType(), fieldName);
        } else {
            return getDeclaredFieldInHierarchy(clazz, path);
        }
    }
548965
JSField getFieldDef(int accessor, boolean mustBePresent) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "getFieldDef", new Object[]{Integer.valueOf(accessor), Boolean.valueOf(mustBePresent)});

    if (mustBePresent) {
      if ((map == null) || (map.fields[accessor] == null)) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getFieldDef", null);
        return null;
      }
    }

    JSField result = fields[accessor];
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getFieldDef", result);
    return result;
  }
699759
private void parameter( ParameterSupportBuilder< ? > statement,
                            boolean requiresType ) throws RecognitionException {
        String type = "Object";
        if ( requiresType ) {
            type = type();
            if ( state.failed ) return;
        }

        int start = input.index();
        match( input,
               DRL5Lexer.ID,
               null,
               null,
               DroolsEditorType.IDENTIFIER );
        if ( state.failed ) return;

        while ( input.LA( 1 ) == DRL5Lexer.LEFT_SQUARE ) {
            match( input,
                   DRL5Lexer.LEFT_SQUARE,
                   null,
                   null,
                   DroolsEditorType.SYMBOL );
            if ( state.failed ) return;

            match( input,
                   DRL5Lexer.RIGHT_SQUARE,
                   null,
                   null,
                   DroolsEditorType.SYMBOL );
            if ( state.failed ) return;
        }
        int end = input.LT( -1 ).getTokenIndex();

        if ( state.backtracking == 0 ) statement.parameter( type,
                                                            input.toString( start,
                                                                            end ) );
    }
698913
public static <T extends FieldDescription> ElementMatcher.Junction<T> genericFieldType(Type fieldType) {
        return genericFieldType(TypeDefinition.Sort.describe(fieldType));
    }
1141861
@SuppressWarnings("unchecked")
    protected DateFormatWrapper<T> getDefaultFormatter(final FieldAccessor field, final Configuration config) {
        
        final Optional<CsvDateTimeFormat> formatAnno = field.getAnnotation(CsvDateTimeFormat.class);
        if(!formatAnno.isPresent()) {
            return new DateFormatWrapper<>(new SimpleDateFormat(getDefaultPattern()), (Class<T>)field.getType());
        }
        
        String pattern = formatAnno.get().pattern();
        if(pattern.isEmpty()) {
            pattern = getDefaultPattern();
        }
        
        final boolean lenient = formatAnno.get().lenient();
        final Locale locale = Utils.getLocale(formatAnno.get().locale());
        final TimeZone timeZone = formatAnno.get().timezone().isEmpty() ? TimeZone.getDefault()
                : TimeZone.getTimeZone(formatAnno.get().timezone());
        
        final DateFormat formatter = SimpleDateFormatBuilder.create(pattern)
                .lenient(lenient)
                .locale(locale)
                .timeZone(timeZone)
                .build();
        
        final DateFormatWrapper<T> wrapper = new DateFormatWrapper<>(formatter, (Class<T>)field.getType()); 
        wrapper.setValidationMessage(formatAnno.get().message());
        
        return wrapper;
        
    }
745506
public int findFieldOffsetForPath(final String fieldPath) {
    for (final JBBPNamedFieldInfo f : this.namedFieldData) {
      if (f.getFieldPath().equals(fieldPath)) {
        return f.getFieldOffsetInCompiledBlock();
      }
    }
    throw new JBBPIllegalArgumentException("Unknown field path [" + fieldPath + ']');
  }