public List<InternalAggregationFunction> generateAggregationFunctions(Class<?> clazz)
{
AggregationFunction aggregationAnnotation = clazz.getAnnotation(AggregationFunction.class);
checkNotNull(aggregationAnnotation, "aggregationAnnotation is null");
DynamicClassLoader classLoader = new DynamicClassLoader(clazz.getClassLoader());
ImmutableList.Builder<InternalAggregationFunction> builder = ImmutableList.builder();
for (Class<?> stateClass : getStateClasses(clazz)) {
AccumulatorStateSerializer<?> stateSerializer = new StateCompiler().generateStateSerializer(stateClass, classLoader);
Type intermediateType = stateSerializer.getSerializedType();