use of com.github.javaparser.ast.nodeTypes.NodeWithType in project vue-gwt by Axellience.
the class TemplateParser method resolveTypesUsingImports.
/**
* Resolve all the types in the expression.
* This will replace the Class with the full qualified name using the template imports.
* @param expression A Java expression from the Template
*/
private void resolveTypesUsingImports(Expression expression) {
if (expression instanceof NodeWithType) {
NodeWithType nodeWithType = ((NodeWithType) expression);
nodeWithType.setType(getQualifiedName(nodeWithType.getType()));
}
// Recurse downward in the expression
expression.getChildNodes().stream().filter(Expression.class::isInstance).map(Expression.class::cast).forEach(this::resolveTypesUsingImports);
}
Aggregations