@Override public Object exec(@SuppressWarnings("rawtypes") List arguments) throws TemplateModelException { ExecutionStatistics.get().begin(NAME); if (arguments.size() != 1) { throw new TemplateModelException("Error, method expects one argument (FileModel)"); } StringModel fileModelArg = (StringModel) arguments.get(0); FileModel fileModel = (FileModel) fileModelArg.getWrappedObject(); Object result = classificationService.getMigrationEffortPoints(fileModel) + inlineHintService.getMigrationEffortPoints(fileModel); ExecutionStatistics.get().end(NAME); return result; } }
@Override public Object exec(@SuppressWarnings("rawtypes") List arguments) throws TemplateModelException { ExecutionStatistics.get().begin(NAME); if (arguments.size() != 1) { throw new TemplateModelException("Error, method expects one argument (FileModel)"); } StringModel fileModelArg = (StringModel) arguments.get(0); FileModel fileModel = (FileModel) fileModelArg.getWrappedObject(); Object result = classificationService.getMigrationEffortPoints(fileModel) + inlineHintService.getMigrationEffortPoints(fileModel); ExecutionStatistics.get().end(NAME); return result; } }