Top Description Fields Constructors Methods
com.github.javaparser.ast.validator

public Class ProblemReporter

extends Object
Class Inheritance
Imports
com.github.javaparser.Problem, .TokenRange, com.github.javaparser.ast.nodeTypes.NodeWithTokenRange, java.util.function.Consumer

A simple interface where validators can report found problems.

Field Summary

Modifier and TypeField and Description
private final Consumer<Problem>

Constructor Summary

AccessConstructor and Description
public
ProblemReporter(Consumer<Problem> problemConsumer)

Method Summary

Modifier and TypeMethod and Description
public void
report(NodeWithTokenRange<?>
the node in which the problem occurred, used to find the Range of the problem.
node
,
String
description of the problem
message
,
Object... args)

Report a problem.

public void
report(TokenRange range, String message, Object... args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

problemConsumerback to summary
private final Consumer<Problem> problemConsumer

Constructor Detail

ProblemReporterback to summary
public ProblemReporter(Consumer<Problem> problemConsumer)

Method Detail

reportback to summary
public void report(NodeWithTokenRange<?> node, String message, Object... args)

Report a problem.

Parameters
node:NodeWithTokenRange<?>

the node in which the problem occurred, used to find the Range of the problem.

message:String

description of the problem

reportback to summary
public void report(TokenRange range, String message, Object... args)