Class AbstractCompilerIssues
- java.lang.Object
-
- net.officefloor.compile.impl.issues.AbstractCompilerIssues
-
- All Implemented Interfaces:
CompilerIssues
- Direct Known Subclasses:
FailCompilerIssues
,FailTestCompilerIssues
,StderrCompilerIssues
public abstract class AbstractCompilerIssues extends java.lang.Object implements CompilerIssues
AbstractCompilerIssues
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AbstractCompilerIssues()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CompileError
addIssue(Node node, java.lang.String issueDescription, java.lang.Throwable cause)
Adds an issue regarding a particularNode
.CompileError
addIssue(Node node, java.lang.String issueDescription, CompilerIssue... causes)
Adds an issue regarding a particularNode
.<R> IssueCapture<R>
captureIssues(java.util.function.Supplier<R> supplier)
CapturesCompilerIssue
instances.protected CompilerIssue
createCompilerIssue(Node node, java.lang.String issueDescription, java.lang.Throwable cause, CompilerIssue[] causes)
Creates theCompilerIssue
for use in abstract functionality.protected abstract void
handleDefaultIssue(DefaultCompilerIssue issue)
Implement to handleDefaultCompilerIssue
.protected void
handleIssue(CompilerIssue issue)
Override to handle theCompilerIssue
.
-
-
-
Method Detail
-
handleIssue
protected void handleIssue(CompilerIssue issue)
Override to handle theCompilerIssue
.- Parameters:
issue
-CompilerIssue
.
-
handleDefaultIssue
protected abstract void handleDefaultIssue(DefaultCompilerIssue issue)
Implement to handleDefaultCompilerIssue
.- Parameters:
issue
-DefaultCompilerIssue
.
-
captureIssues
public <R> IssueCapture<R> captureIssues(java.util.function.Supplier<R> supplier)
Description copied from interface:CompilerIssues
CapturesCompilerIssue
instances.- Specified by:
captureIssues
in interfaceCompilerIssues
- Type Parameters:
R
- Return type ofSupplier
logic.- Parameters:
supplier
-Supplier
of code to captureCompilerIssue
within.- Returns:
IssueCapture
.
-
addIssue
public CompileError addIssue(Node node, java.lang.String issueDescription, CompilerIssue... causes)
Description copied from interface:CompilerIssues
Adds an issue regarding a particularNode
.- Specified by:
addIssue
in interfaceCompilerIssues
- Parameters:
node
-Node
.issueDescription
- Description of the issue.causes
- PossibleCompilerIssue
instances causing this issue.- Returns:
CompileError
to be used inthrow
statement when addingCompilerIssue
to avoid further compiling of theNode
.
-
addIssue
public CompileError addIssue(Node node, java.lang.String issueDescription, java.lang.Throwable cause)
Description copied from interface:CompilerIssues
Adds an issue regarding a particularNode
.- Specified by:
addIssue
in interfaceCompilerIssues
- Parameters:
node
-Node
.issueDescription
- Description of the issue.cause
- Cause of the issue.- Returns:
CompileError
to be used inthrow
statement when addingCompilerIssue
to avoid further compiling of theNode
.
-
createCompilerIssue
protected CompilerIssue createCompilerIssue(Node node, java.lang.String issueDescription, java.lang.Throwable cause, CompilerIssue[] causes)
Creates theCompilerIssue
for use in abstract functionality. If not overriden, aDefaultCompilerIssue
is used.- Parameters:
node
-Node
.issueDescription
- Issue description.cause
- Optional cause. May benull
.causes
- Optional causeCompilerIssue
instances.- Returns:
CompilerIssue
, with default implementation providing aDefaultCompilerIssue
.
-
-