class FieldReferMetadataCreator implements ReferMetadataCreator {

    @Override
    public boolean isApplicable(Type type, String ref) {
        Field field;
        try {
            field = TypeUtils.getRawType(type, null).getField(ref);
        } catch (NoSuchFieldException e) {
            return false;
        }
        return Modifier.isPublic(field.getModifiers());
    }

}