super(adapters);
}
@Override
public ClassOrInterfaceType adapt(ClassOrInterfaceTypeContext context) {
ClassOrInterfaceType classOrInterfaceType = null;
for (ParseTree child : context.children) {
if (child instanceof TerminalNode
&& ((TerminalNode) child).getSymbol().getType() == JavaParser.Identifier) {
ClassOrInterfaceType newClassOrInterfaceType =
createNode(context, child, ClassOrInterfaceType.class);
newClassOrInterfaceType.setName(
getAdapter(IdentifierAdapter.class).adapt((TerminalNode) child));
newClassOrInterfaceType.setScope(classOrInterfaceType);
classOrInterfaceType = newClassOrInterfaceType;
} else if (child instanceof TypeArgumentsContext && classOrInterfaceType != null) {
setNodeAttributes(classOrInterfaceType, context, child);
classOrInterfaceType.setTypeArguments(
getAdapter(TypeArgumentsAdapter.class).adapt((TypeArgumentsContext) child));