use of ilargia.entitas.codeGeneration.plugins.data.MethodData in project Entitas-Java by Rubentxu.
the class EntityIndexDataProvider method createCustomEntityIndexData.
SourceDataFile createCustomEntityIndexData(SourceDataFile data) {
AnnotationSource annotation = data.getFileContent().getAnnotation(CustomEntityIndex.class);
setEntityIndexType(data, data.getFileContent().getName());
isCustom(data, true);
setEntityIndexName(data, data.getFileContent().getCanonicalName());
setContextNames(data, Arrays.asList(annotation.getStringValue()));
List<MethodData> getMethods = data.getFileContent().getMethods().stream().filter(m -> m.isPublic()).filter(m -> m.hasAnnotation(EntityIndexGetMethod.class)).map(m -> new MethodData(m.getReturnType(), m.getName(), m.getParameters().stream().map(p -> new MemberData(p.getType(), p.getName(), p.getAnnotations().size() > 0 ? p.getAnnotations().get(0) : null)).collect(Collectors.toList()), m.getAnnotation(EntityIndexGetMethod.class))).collect(Collectors.toList());
setCustomMethods(data, getMethods);
return data;
}
Aggregations