use of com.redhat.qute.commons.JavaElementKind in project quarkus-ls by redhat-developer.
the class ExtendedDataModelProject method updateValueResolvers.
private static void updateValueResolvers(List<TypeValueResolver> typeValueResolvers, List<FieldValueResolver> fieldValueResolvers, List<MethodValueResolver> methodValueResolvers, DataModelProject<DataModelTemplate<DataModelParameter>> project) {
project.getValueResolvers().forEach(resolver -> {
JavaElementKind kind = resolver.getJavaElementKind();
switch(kind) {
case TYPE:
TypeValueResolver typeValueResolver = new TypeValueResolver();
typeValueResolver.setNamed(resolver.getNamed());
typeValueResolver.setNamespace(resolver.getNamespace());
typeValueResolver.setSignature(resolver.getSignature());
typeValueResolver.setSourceType(resolver.getSourceType());
typeValueResolvers.add(typeValueResolver);
break;
case FIELD:
FieldValueResolver fieldValueResolver = new FieldValueResolver();
fieldValueResolver.setNamed(resolver.getNamed());
fieldValueResolver.setNamespace(resolver.getNamespace());
fieldValueResolver.setSignature(resolver.getSignature());
fieldValueResolver.setSourceType(resolver.getSourceType());
fieldValueResolvers.add(fieldValueResolver);
break;
case METHOD:
MethodValueResolver methodValueResolver = new MethodValueResolver();
methodValueResolver.setNamed(resolver.getNamed());
methodValueResolver.setNamespace(resolver.getNamespace());
methodValueResolver.setMatchName(resolver.getMatchName());
methodValueResolver.setSignature(resolver.getSignature());
methodValueResolver.setSourceType(resolver.getSourceType());
methodValueResolvers.add(methodValueResolver);
break;
default:
break;
}
});
}
Aggregations