private String getOutputFileName(ExecutionContext executionContext) { Map<String, Object> beanMap = FreeMarkerUtils.getMergedModel(executionContext); return fileNameTemplate.apply( beanMap ); }
@Override public synchronized void flush() throws IOException { log(); }
@SuppressWarnings("unchecked") public Set<?> getProducts() { // Doesn't actually produce anything. Just using the Producer/Consumer mechanism to // force this vistor to the top of the visitor apply list. return CollectionsUtil.toSet(); } }
/** * Generates a file name by delegating to {@link FreeMarkerTemplate } * * @param templateString - FreeMarker template * @param dataModel - FreeMarker data model * @throws NamingStrategyException * @throws TemplateException */ public String generateFileName(final String templateString, final Object dataModel) throws NamingStrategyException { FreeMarkerTemplate template = new FreeMarkerTemplate(templateString); return template.apply( dataModel ); }
public static Method getGetterMethodByProperty(String propertyName, Class<?> beanClass, Class<?> returnType) { Method getter = getGetterMethod(toGetterName(propertyName), beanClass, returnType); if(getter == null) { getter = getGetterMethod(toIsGetterName(propertyName), beanClass, returnType); } return getter; } }
/** * Checks if the class in the first parameter is assignable * to one of the classes in the second or any later parameter. * * @param toFind The class to check for assignment compatibility. * @param classes The classes against which {@code toFind} should be checked. * @return {@literal true} if {@code toFind} is assignable to any one of the * specified classes. */ public static boolean containsAssignableClass(final Class<?> toFind, final Class<?> ... classes) { return indexOfFirstAssignableClass(toFind, classes) != -1; }
private String getOutputFileName(ExecutionContext executionContext) { Map<String, Object> beanMap = FreeMarkerUtils.getMergedModel(executionContext); return fileNameTemplate.apply(beanMap); }
public static Method getGetterMethodByProperty(String propertyName, Class<?> beanClass, Class<?> returnType) { Method getter = getGetterMethod(toGetterName(propertyName), beanClass, returnType); if(getter == null) { getter = getGetterMethod(toIsGetterName(propertyName), beanClass, returnType); } return getter; } }
public Set<? extends Object> getProducts() { // Doesn't actually produce anything. Just using the Producer/Consumer mechanism to // force this vistor to the top of the visitor apply list. return CollectionsUtil.toSet(); } }
/** * Checks if the class in the first parameter is assignable * to one of the classes in the second or any later parameter. * * @param toFind The class to check for assignment compatibility. * @param classes The classes against which {@code toFind} should be checked. * @return {@literal true} if {@code toFind} is assignable to any one of the * specified classes. */ public static boolean containsAssignableClass(final Class<?> toFind, final Class<?> ... classes) { return indexOfFirstAssignableClass(toFind, classes) != -1; }
@Override public synchronized void flush() throws IOException { log(); }
private String getListFileName(ExecutionContext executionContext) { Map<String, Object> beanMap = FreeMarkerUtils.getMergedModel(executionContext); return listFileNameTemplate.apply(beanMap); }
public static Method getGetterMethodByProperty(String propertyName, Class<?> beanClass, Class<?> returnType) { Method getter = getGetterMethod(toGetterName(propertyName), beanClass, returnType); if(getter == null) { getter = getGetterMethod(toIsGetterName(propertyName), beanClass, returnType); } return getter; } }
@SuppressWarnings("unchecked") public Set<?> getProducts() { // Doesn't actually produce anything. Just using the Producer/Consumer mechanism to // force this vistor to the top of the visitor apply list. return CollectionsUtil.toSet(); } }
/** * Checks if the class in the first parameter is assignable * to one of the classes in the second or any later parameter. * * @param toFind The class to check for assignment compatibility. * @param classes The classes against which {@code toFind} should be checked. * @return {@literal true} if {@code toFind} is assignable to any one of the * specified classes. */ public static boolean containsAssignableClass(final Class<?> toFind, final Class<?> ... classes) { return indexOfFirstAssignableClass(toFind, classes) != -1; }
@Override public synchronized void flush() throws IOException { log(); }
private String getListFileName(ExecutionContext executionContext) { Map<String, Object> beanMap = FreeMarkerUtils.getMergedModel(executionContext); return listFileNameTemplate.apply(beanMap); }
@SuppressWarnings("unchecked") public Set<?> getProducts() { // Doesn't actually produce anything. Just using the Producer/Consumer mechanism to // force this vistor to the top of the visitor apply list. return CollectionsUtil.toSet(); } }