88import org .hibernate .grammars .graph .GraphLanguageLexer ;
99import org .hibernate .grammars .graph .GraphLanguageParser ;
1010import org .hibernate .grammars .graph .GraphLanguageParserBaseVisitor ;
11+ import org .hibernate .graph .GraphNode ;
1112import org .hibernate .graph .InvalidGraphException ;
1213import org .hibernate .graph .spi .AttributeNodeImplementor ;
1314import org .hibernate .graph .spi .GraphImplementor ;
2425/**
2526 * @author Steve Ebersole
2627 */
27- public class GraphParser extends GraphLanguageParserBaseVisitor {
28+ public class GraphParser extends GraphLanguageParserBaseVisitor < GraphNode <?>> {
2829
2930 /**
3031 * Parse the passed graph textual representation into the passed Graph.
@@ -64,16 +65,16 @@ public static void parseInto(
6465
6566 private final SessionFactoryImplementor sessionFactory ;
6667
67- private final Stack <GraphImplementor > graphStack = new StandardStack <>();
68- private final Stack <AttributeNodeImplementor > attributeNodeStack = new StandardStack <>();
68+ private final Stack <GraphImplementor <?> > graphStack = new StandardStack <>();
69+ private final Stack <AttributeNodeImplementor <?,?,?> > attributeNodeStack = new StandardStack <>();
6970 private final Stack <SubGraphGenerator > graphSourceStack = new StandardStack <>();
7071
7172 public GraphParser (SessionFactoryImplementor sessionFactory ) {
7273 this .sessionFactory = sessionFactory ;
7374 }
7475
7576 @ Override
76- public AttributeNodeImplementor visitAttributeNode (GraphLanguageParser .AttributeNodeContext ctx ) {
77+ public AttributeNodeImplementor <?,?,?> visitAttributeNode (GraphLanguageParser .AttributeNodeContext ctx ) {
7778 final String attributeName = ctx .attributePath ().ATTR_NAME ().getText ();
7879
7980 final SubGraphGenerator subGraphCreator ;
@@ -105,7 +106,7 @@ public AttributeNodeImplementor visitAttributeNode(GraphLanguageParser.Attribute
105106 subGraphCreator = pathQualifierType .getSubGraphCreator ();
106107 }
107108
108- final AttributeNodeImplementor attributeNode = resolveAttributeNode ( attributeName );
109+ final AttributeNodeImplementor <?,?,?> attributeNode = resolveAttributeNode ( attributeName );
109110
110111 if ( ctx .subGraph () != null ) {
111112 attributeNodeStack .push ( attributeNode );
@@ -132,12 +133,11 @@ public AttributeNodeImplementor visitAttributeNode(GraphLanguageParser.Attribute
132133 return attributeNode ;
133134 }
134135
135-
136- private AttributeNodeImplementor resolveAttributeNode (String attributeName ) {
136+ private AttributeNodeImplementor <?,?,?> resolveAttributeNode (String attributeName ) {
137137 final GraphImplementor <?> currentGraph = graphStack .getCurrent ();
138138 assert currentGraph != null ;
139139
140- final AttributeNodeImplementor attributeNode = currentGraph .findOrCreateAttributeNode ( attributeName );
140+ final AttributeNodeImplementor <?,?,?> attributeNode = currentGraph .findOrCreateAttributeNode ( attributeName );
141141 assert attributeNode != null ;
142142
143143 return attributeNode ;
@@ -156,7 +156,7 @@ private PathQualifierType resolvePathQualifier(String qualifier) {
156156 }
157157
158158 @ Override
159- public SubGraphImplementor visitSubGraph (GraphLanguageParser .SubGraphContext ctx ) {
159+ public SubGraphImplementor <?> visitSubGraph (GraphLanguageParser .SubGraphContext ctx ) {
160160 final String subTypeName = ctx .subType () == null ? null : ctx .subType ().getText ();
161161
162162 if ( PARSING_LOGGER .isDebugEnabled () ) {
0 commit comments