@Test public void testEndpointAnalysis(){ AnalysisResult result = new AnalysisResult(); result.setSourceName("Endpoint"); result.setPackageName("endpoint.endpointavg"); result.setSourceAttribute("latency"); result.setMetricName("EndpointAvg"); result.setAggregationFunctionName("longAvg"); DeepAnalysis analysis = new DeepAnalysis(); result = analysis.analysis(result); EntryMethod method = result.getEntryMethod(); Assert.assertEquals("combine", method.getMethodName()); Assert.assertEquals("source.getLatency()", method.getArgsExpressions().get(0)); Assert.assertEquals("1", method.getArgsExpressions().get(1)); List<SourceColumn> source = result.getFieldsFromSource(); Assert.assertEquals(3, source.size()); List<DataColumn> persistentFields = result.getPersistentFields(); Assert.assertEquals(4, persistentFields.size()); }
public AnalysisResult analysis(AnalysisResult result) { result.setPackageName(result.getSourceName().toLowerCase()); Class<? extends Indicator> indicatorClass = Indicators.find(result.getAggregationFunctionName()); String indicatorClassSimpleName = indicatorClass.getSimpleName(); IndicatorOperator indicatorClassAnnotation = null; do { indicatorClassAnnotation = indicatorClass.getAnnotation(IndicatorOperator.class); if (indicatorClassAnnotation == null) { indicatorClass = (Class<? extends Indicator>)indicatorClass.getSuperclass(); if (indicatorClass.equals(Indicator.class)) { break; } } } while (indicatorClassAnnotation == null); if (indicatorClassAnnotation == null) { throw new IllegalArgumentException("Can't find IndicatorOperator in class: " + indicatorClass.getName()); } result.setIndicatorClassName(indicatorClassSimpleName); List<ConditionExpression> expressions = result.getFilterExpressionsParserResult(); if (expressions != null && expressions.size() > 0) { for (ConditionExpression expression : expressions) { FilterExpression filterExpression = new FilterExpression(); if ("booleanMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toIsMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else if ("stringMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toGetMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else { throw new IllegalArgumentException("filter expression [" + expression.getExpressionType() + "] not found"); } } } Class c = indicatorClass; Method entranceMethod = null; SearchEntrance: while (!c.equals(Object.class)) { for (Method method : c.getMethods()) { Entrance annotation = method.getAnnotation(Entrance.class); if (annotation != null) { entranceMethod = method; break SearchEntrance; } } c = c.getSuperclass(); } if (entranceMethod == null) { throw new IllegalArgumentException("Can't find Entrance method in class: " + indicatorClass.getName()); } EntryMethod entryMethod = new EntryMethod(); result.setEntryMethod(entryMethod); entryMethod.setMethodName(entranceMethod.getName()); for (Parameter parameter : entranceMethod.getParameters()) { Annotation[] parameterAnnotations = parameter.getAnnotations(); if (parameterAnnotations == null || parameterAnnotations.length == 0) { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't include the annotation."); } Annotation annotation = parameterAnnotations[0]; if (annotation instanceof SourceFrom) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(result.getSourceAttribute()) + "()"); } else if (annotation instanceof ConstOne) { entryMethod.addArg("1"); } else if (annotation instanceof Expression) { entryMethod.addArg("new " + parameter.getType().getName() + "()"); } else if (annotation instanceof ExpressionArg0) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); if ("booleanMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toIsMethod(conditionExpression.getAttribute()) + "()"); } else if ("stringMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(conditionExpression.getAttribute()) + "()"); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but expression type is not supported"); } } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof ExpressionArg1) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); entryMethod.addArg(conditionExpression.getValue()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof Arg) { entryMethod.addArg(result.getNextFuncArg()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't the expected annotation."); } } c = indicatorClass; while (!c.equals(Object.class)) { for (Field field : c.getDeclaredFields()) { Column column = field.getAnnotation(Column.class); if (column != null) { result.addPersistentField(field.getName(), column.columnName(), field.getType()); } } c = c.getSuperclass(); } List<SourceColumn> columns = SourceColumnsFactory.getColumns(result.getSourceName()); result.setFieldsFromSource(columns); result.generateSerializeFields(); return result; }
DeepAnalysis { public AnalysisResult analysis(AnalysisResult result) { result.setPackageName(result.getSourceName().toLowerCase()); Class<? extends Indicator> indicatorClass = Indicators.find(result.getAggregationFunctionName()); String indicatorClassSimpleName = indicatorClass.getSimpleName(); IndicatorOperator indicatorClassAnnotation = null; do { indicatorClassAnnotation = indicatorClass.getAnnotation(IndicatorOperator.class); if (indicatorClassAnnotation == null) { indicatorClass = (Class<? extends Indicator>)indicatorClass.getSuperclass(); if (indicatorClass.equals(Indicator.class)) { break; } } } while (indicatorClassAnnotation == null); if (indicatorClassAnnotation == null) { throw new IllegalArgumentException("Can't find IndicatorOperator in class: " + indicatorClass.getName()); } result.setIndicatorClassName(indicatorClassSimpleName); List<ConditionExpression> expressions = result.getFilterExpressionsParserResult(); if (expressions != null && expressions.size() > 0) { for (ConditionExpression expression : expressions) { FilterExpression filterExpression = new FilterExpression(); if ("booleanMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toIsMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else if ("stringMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toGetMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else { throw new IllegalArgumentException("filter expression [" + expression.getExpressionType() + "] not found"); } } } Class c = indicatorClass; Method entranceMethod = null; SearchEntrance: while (!c.equals(Object.class)) { for (Method method : c.getMethods()) { Entrance annotation = method.getAnnotation(Entrance.class); if (annotation != null) { entranceMethod = method; break SearchEntrance; } } c = c.getSuperclass(); } if (entranceMethod == null) { throw new IllegalArgumentException("Can't find Entrance method in class: " + indicatorClass.getName()); } EntryMethod entryMethod = new EntryMethod(); result.setEntryMethod(entryMethod); entryMethod.setMethodName(entranceMethod.getName()); for (Parameter parameter : entranceMethod.getParameters()) { Annotation[] parameterAnnotations = parameter.getAnnotations(); if (parameterAnnotations == null || parameterAnnotations.length == 0) { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't include the annotation."); } Annotation annotation = parameterAnnotations[0]; if (annotation instanceof SourceFrom) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(result.getSourceAttribute()) + "()"); } else if (annotation instanceof ConstOne) { entryMethod.addArg("1"); } else if (annotation instanceof Expression) { entryMethod.addArg("new " + parameter.getType().getName() + "()"); } else if (annotation instanceof ExpressionArg0) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); if ("booleanMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toIsMethod(conditionExpression.getAttribute()) + "()"); } else if ("stringMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(conditionExpression.getAttribute()) + "()"); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but expression type is not supported"); } } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof ExpressionArg1) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); entryMethod.addArg(conditionExpression.getValue()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof Arg) { entryMethod.addArg(result.getNextFuncArg()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't the expected annotation."); } } c = indicatorClass; while (!c.equals(Object.class)) { for (Field field : c.getDeclaredFields()) { Column column = field.getAnnotation(Column.class); if (column != null) { result.addPersistentField(field.getName(), column.columnName(), field.getType()); } } c = c.getSuperclass(); } List<SourceColumn> columns = SourceColumnsFactory.getColumns(result.getSourceName()); result.setFieldsFromSource(columns); result.generateSerializeFields(); return result; } }
DeepAnalysis { public AnalysisResult analysis(AnalysisResult result) { result.setPackageName(result.getSourceName().toLowerCase()); Class<? extends Indicator> indicatorClass = Indicators.find(result.getAggregationFunctionName()); String indicatorClassSimpleName = indicatorClass.getSimpleName(); IndicatorOperator indicatorClassAnnotation = null; do { indicatorClassAnnotation = indicatorClass.getAnnotation(IndicatorOperator.class); if (indicatorClassAnnotation == null) { indicatorClass = (Class<? extends Indicator>)indicatorClass.getSuperclass(); if (indicatorClass.equals(Indicator.class)) { break; } } } while (indicatorClassAnnotation == null); if (indicatorClassAnnotation == null) { throw new IllegalArgumentException("Can't find IndicatorOperator in class: " + indicatorClass.getName()); } result.setIndicatorClassName(indicatorClassSimpleName); List<ConditionExpression> expressions = result.getFilterExpressionsParserResult(); if (expressions != null && expressions.size() > 0) { for (ConditionExpression expression : expressions) { FilterExpression filterExpression = new FilterExpression(); if ("booleanMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toIsMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else if ("stringMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toGetMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else { throw new IllegalArgumentException("filter expression [" + expression.getExpressionType() + "] not found"); } } } Class c = indicatorClass; Method entranceMethod = null; SearchEntrance: while (!c.equals(Object.class)) { for (Method method : c.getMethods()) { Entrance annotation = method.getAnnotation(Entrance.class); if (annotation != null) { entranceMethod = method; break SearchEntrance; } } c = c.getSuperclass(); } if (entranceMethod == null) { throw new IllegalArgumentException("Can't find Entrance method in class: " + indicatorClass.getName()); } EntryMethod entryMethod = new EntryMethod(); result.setEntryMethod(entryMethod); entryMethod.setMethodName(entranceMethod.getName()); for (Parameter parameter : entranceMethod.getParameters()) { Annotation[] parameterAnnotations = parameter.getAnnotations(); if (parameterAnnotations == null || parameterAnnotations.length == 0) { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't include the annotation."); } Annotation annotation = parameterAnnotations[0]; if (annotation instanceof SourceFrom) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(result.getSourceAttribute()) + "()"); } else if (annotation instanceof ConstOne) { entryMethod.addArg("1"); } else if (annotation instanceof Expression) { entryMethod.addArg("new " + parameter.getType().getName() + "()"); } else if (annotation instanceof ExpressionArg0) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); if ("booleanMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toIsMethod(conditionExpression.getAttribute()) + "()"); } else if ("stringMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(conditionExpression.getAttribute()) + "()"); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but expression type is not supported"); } } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof ExpressionArg1) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); entryMethod.addArg(conditionExpression.getValue()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof Arg) { entryMethod.addArg(result.getNextFuncArg()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't the expected annotation."); } } c = indicatorClass; while (!c.equals(Object.class)) { for (Field field : c.getDeclaredFields()) { Column column = field.getAnnotation(Column.class); if (column != null) { result.addPersistentField(field.getName(), column.columnName(), field.getType()); } } c = c.getSuperclass(); } List<SourceColumn> columns = SourceColumnsFactory.getColumns(result.getSourceName()); result.setFieldsFromSource(columns); result.generateSerializeFields(); return result; }  }
DeepAnalysis { public AnalysisResult analysis(AnalysisResult result) { result.setPackageName(result.getSourceName().toLowerCase()); Class<? extends Indicator> indicatorClass = Indicators.find(result.getAggregationFunctionName()); String indicatorClassSimpleName = indicatorClass.getSimpleName(); IndicatorOperator indicatorClassAnnotation = null; do { indicatorClassAnnotation = indicatorClass.getAnnotation(IndicatorOperator.class); if (indicatorClassAnnotation == null) { indicatorClass = (Class<? extends Indicator>)indicatorClass.getSuperclass(); if (indicatorClass.equals(Indicator.class)) { break; } } } while (indicatorClassAnnotation == null); if (indicatorClassAnnotation == null) { throw new IllegalArgumentException("Can't find IndicatorOperator in class: " + indicatorClass.getName()); } result.setIndicatorClassName(indicatorClassSimpleName); List<ConditionExpression> expressions = result.getFilterExpressionsParserResult(); if (expressions != null && expressions.size() > 0) { for (ConditionExpression expression : expressions) { FilterExpression filterExpression = new FilterExpression(); if ("booleanMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toIsMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else if ("stringMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toGetMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else { throw new IllegalArgumentException("filter expression [" + expression.getExpressionType() + "] not found"); } } } Class c = indicatorClass; Method entranceMethod = null; SearchEntrance: while (!c.equals(Object.class)) { for (Method method : c.getMethods()) { Entrance annotation = method.getAnnotation(Entrance.class); if (annotation != null) { entranceMethod = method; break SearchEntrance; } } c = c.getSuperclass(); } if (entranceMethod == null) { throw new IllegalArgumentException("Can't find Entrance method in class: " + indicatorClass.getName()); } EntryMethod entryMethod = new EntryMethod(); result.setEntryMethod(entryMethod); entryMethod.setMethodName(entranceMethod.getName()); for (Parameter parameter : entranceMethod.getParameters()) { Annotation[] parameterAnnotations = parameter.getAnnotations(); if (parameterAnnotations == null || parameterAnnotations.length == 0) { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't include the annotation."); } Annotation annotation = parameterAnnotations[0]; if (annotation instanceof SourceFrom) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(result.getSourceAttribute()) + "()"); } else if (annotation instanceof ConstOne) { entryMethod.addArg("1"); } else if (annotation instanceof Expression) { entryMethod.addArg("new " + parameter.getType().getName() + "()"); } else if (annotation instanceof ExpressionArg0) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); if ("booleanMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toIsMethod(conditionExpression.getAttribute()) + "()"); } else if ("stringMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(conditionExpression.getAttribute()) + "()"); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but expression type is not supported"); } } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof ExpressionArg1) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); entryMethod.addArg(conditionExpression.getValue()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof Arg) { entryMethod.addArg(result.getNextFuncArg()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't the expected annotation."); } } c = indicatorClass; while (!c.equals(Object.class)) { for (Field field : c.getDeclaredFields()) { Column column = field.getAnnotation(Column.class); if (column != null) { result.addPersistentField(field.getName(), column.columnName(), field.getType()); } } c = c.getSuperclass(); } List<SourceColumn> columns = SourceColumnsFactory.getColumns(result.getSourceName()); result.setFieldsFromSource(columns); result.generateSerializeFields(); return result; }  AnalysisResult analysis(AnalysisResult result); }
DeepAnalysis { public AnalysisResult analysis(AnalysisResult result) { result.setPackageName(result.getSourceName().toLowerCase()); Class<? extends Indicator> indicatorClass = Indicators.find(result.getAggregationFunctionName()); String indicatorClassSimpleName = indicatorClass.getSimpleName(); IndicatorOperator indicatorClassAnnotation = null; do { indicatorClassAnnotation = indicatorClass.getAnnotation(IndicatorOperator.class); if (indicatorClassAnnotation == null) { indicatorClass = (Class<? extends Indicator>)indicatorClass.getSuperclass(); if (indicatorClass.equals(Indicator.class)) { break; } } } while (indicatorClassAnnotation == null); if (indicatorClassAnnotation == null) { throw new IllegalArgumentException("Can't find IndicatorOperator in class: " + indicatorClass.getName()); } result.setIndicatorClassName(indicatorClassSimpleName); List<ConditionExpression> expressions = result.getFilterExpressionsParserResult(); if (expressions != null && expressions.size() > 0) { for (ConditionExpression expression : expressions) { FilterExpression filterExpression = new FilterExpression(); if ("booleanMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toIsMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else if ("stringMatch".equals(expression.getExpressionType())) { filterExpression.setExpressionObject("EqualMatch"); filterExpression.setLeft("source." + ClassMethodUtil.toGetMethod(expression.getAttribute()) + "()"); filterExpression.setRight(expression.getValue()); result.addFilterExpressions(filterExpression); } else { throw new IllegalArgumentException("filter expression [" + expression.getExpressionType() + "] not found"); } } } Class c = indicatorClass; Method entranceMethod = null; SearchEntrance: while (!c.equals(Object.class)) { for (Method method : c.getMethods()) { Entrance annotation = method.getAnnotation(Entrance.class); if (annotation != null) { entranceMethod = method; break SearchEntrance; } } c = c.getSuperclass(); } if (entranceMethod == null) { throw new IllegalArgumentException("Can't find Entrance method in class: " + indicatorClass.getName()); } EntryMethod entryMethod = new EntryMethod(); result.setEntryMethod(entryMethod); entryMethod.setMethodName(entranceMethod.getName()); for (Parameter parameter : entranceMethod.getParameters()) { Annotation[] parameterAnnotations = parameter.getAnnotations(); if (parameterAnnotations == null || parameterAnnotations.length == 0) { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't include the annotation."); } Annotation annotation = parameterAnnotations[0]; if (annotation instanceof SourceFrom) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(result.getSourceAttribute()) + "()"); } else if (annotation instanceof ConstOne) { entryMethod.addArg("1"); } else if (annotation instanceof Expression) { entryMethod.addArg("new " + parameter.getType().getName() + "()"); } else if (annotation instanceof ExpressionArg0) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); if ("booleanMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toIsMethod(conditionExpression.getAttribute()) + "()"); } else if ("stringMatch".equals(conditionExpression.getExpressionType())) { entryMethod.addArg("source." + ClassMethodUtil.toGetMethod(conditionExpression.getAttribute()) + "()"); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but expression type is not supported"); } } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof ExpressionArg1) { if (result.getFuncConditionExpressions().size() == 1) { ConditionExpression conditionExpression = result.getFuncConditionExpressions().get(0); entryMethod.addArg(conditionExpression.getValue()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " argument has @ExpressionArg0, but can't find funcParamExpression."); } } else if (annotation instanceof Arg) { entryMethod.addArg(result.getNextFuncArg()); } else { throw new IllegalArgumentException("Entrance method:" + entranceMethod + " doesn't the expected annotation."); } } c = indicatorClass; while (!c.equals(Object.class)) { for (Field field : c.getDeclaredFields()) { Column column = field.getAnnotation(Column.class); if (column != null) { result.addPersistentField(field.getName(), column.columnName(), field.getType()); } } c = c.getSuperclass(); } List<SourceColumn> columns = SourceColumnsFactory.getColumns(result.getSourceName()); result.setFieldsFromSource(columns); result.generateSerializeFields(); return result; }  AnalysisResult analysis(AnalysisResult result);  }