Package com.blogspot.mydailyjava.dp.annotation

Examples of com.blogspot.mydailyjava.dp.annotation.MatchBy


    private static boolean isOptional(Field field) {
        return field.getAnnotation(OptionalMatch.class) != null;
    }

    private static String makePattern(Field field, PropertyDelegate propertyDelegate) {
        MatchBy matchExpression = field.getAnnotation(MatchBy.class);
        if (matchExpression == null) {
            return propertyDelegate.getPattern();
        } else {
            return matchExpression.value();
        }
    }
View Full Code Here


    private static String findRawReadPattern(Class<?> type, String override) {
        if (override != null) {
            return override;
        }
        MatchBy customPattern = type.getAnnotation(MatchBy.class);
        if (customPattern == null || customPattern.value() == null) {
            throw new TransformationException(String.format("%s does not define a default pattern", type));
        }
        return customPattern.value();
    }
View Full Code Here

TOP

Related Classes of com.blogspot.mydailyjava.dp.annotation.MatchBy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.