class FieldReferMetadataCreator implements ReferMetadataCreator {

    @Override
    public ReferMetadata getReferMetadata(Type type, String path) {
        String pathWithoutOperator = path.replace("[*]", "");
        Type refType;
        try {
            refType = TypeUtils.getRawType(type, null).getField(pathWithoutOperator).getGenericType();
        } catch (NoSuchFieldException e) {
            throw new RuntimeException(e);
        }
        return new ReferMetadata(refType, pathWithoutOperator, path);
    }

}