public class DiagnosticsAggregator extends Object implements IDiagnosticsVisitor
Modifier and Type | Class and Description |
---|---|
static class |
DiagnosticsAggregator.ProblemDescription
A ProblemDescription holds information about a particular problem occurrence.
|
Constructor and Description |
---|
DiagnosticsAggregator() |
Modifier and Type | Method and Description |
---|---|
List<DiagnosticsAggregator.ProblemDescription> |
getErrors()
Get problem-level diagnostics seen by this visitor.
|
List<DiagnosticsAggregator.ProblemDescription> |
getWarnings()
Get warning-level diagnostics seen by this visitor.
|
void |
incorrectNumberOfParameterNames(MethodInfo methodInfo)
A
MethodInfo has a different number of parameter names than
parameter types. |
void |
nativeMethodWithMethodBody(MethodInfo methodInfo,
MethodBodyInfo methodBodyInfo)
A
MethodInfo for a native method also has an associated
MethodBodyInfo . |
void |
operandStackUnderflow(MethodBodyInfo methodBodyInfo,
IFlowgraph cfg,
IBasicBlock block,
int instructionIndex)
An underflow of operand stack was detected in a basic block in a method.
|
void |
scopeStackUnderflow(MethodBodyInfo methodBodyInfo,
IFlowgraph cfg,
IBasicBlock block,
int instructionIndex)
An underflow of scope stack was detected in a basic block in a method.
|
void |
scriptInitWithRequiredArguments(ScriptInfo scriptInfo,
MethodInfo methodInfo)
A
MethodInfo for the init method of a ScriptInfo has
required arguments. |
void |
tooManyDefaultParameters(MethodInfo methodInfo)
A
MethodInfo has too many default parameters. |
void |
unreachableBlock(MethodBodyInfo methodBodyInfo,
IFlowgraph cfg,
IBasicBlock block)
A basic block in a method has been found to be unreachable.
|
public List<DiagnosticsAggregator.ProblemDescription> getErrors()
public List<DiagnosticsAggregator.ProblemDescription> getWarnings()
public void operandStackUnderflow(MethodBodyInfo methodBodyInfo, IFlowgraph cfg, IBasicBlock block, int instructionIndex)
IDiagnosticsVisitor
operandStackUnderflow
in interface IDiagnosticsVisitor
methodBodyInfo
- MethodBodyInfo
for the method body with the
stack underflow.cfg
- IFlowgraph
for the method body with the stack
underflow.block
- IBasicBlock
in the IFlowgraph
that contains
the stack underflow.instructionIndex
- The index of the instruction in the IBasicBlock
that contains the stack underflow.public void scopeStackUnderflow(MethodBodyInfo methodBodyInfo, IFlowgraph cfg, IBasicBlock block, int instructionIndex)
IDiagnosticsVisitor
scopeStackUnderflow
in interface IDiagnosticsVisitor
methodBodyInfo
- MethodBodyInfo
for the method body with the
stack underflow.cfg
- IFlowgraph
for the method body with the stack
underflow.block
- IBasicBlock
in the IFlowgraph
that contains
the stack underflow.instructionIndex
- The index of the instruction in the IBasicBlock
that contains the stack underflow.public void unreachableBlock(MethodBodyInfo methodBodyInfo, IFlowgraph cfg, IBasicBlock block)
IDiagnosticsVisitor
unreachableBlock
in interface IDiagnosticsVisitor
methodBodyInfo
- MethodBodyInfo
for the method body
with the unreachable block.cfg
- IFlowgraph
for the method body with the
unreachable block.block
- IBasicBlock
in the IFlowgraph
that contains the unreachable block.public void tooManyDefaultParameters(MethodInfo methodInfo)
IDiagnosticsVisitor
MethodInfo
has too many default parameters.tooManyDefaultParameters
in interface IDiagnosticsVisitor
methodInfo
- The MethodInfo
that has too many default
parameters.public void incorrectNumberOfParameterNames(MethodInfo methodInfo)
IDiagnosticsVisitor
MethodInfo
has a different number of parameter names than
parameter types.incorrectNumberOfParameterNames
in interface IDiagnosticsVisitor
methodInfo
- The MethodInfo
that has the incorrect number of
parameter names.public void nativeMethodWithMethodBody(MethodInfo methodInfo, MethodBodyInfo methodBodyInfo)
IDiagnosticsVisitor
MethodInfo
for a native method also has an associated
MethodBodyInfo
.nativeMethodWithMethodBody
in interface IDiagnosticsVisitor
methodInfo
- The MethodInfo
that is marked as a native
method.methodBodyInfo
- The MethodBodyInfo
associated with the
native method.public void scriptInitWithRequiredArguments(ScriptInfo scriptInfo, MethodInfo methodInfo)
IDiagnosticsVisitor
MethodInfo
for the init method of a ScriptInfo
has
required arguments.scriptInitWithRequiredArguments
in interface IDiagnosticsVisitor
scriptInfo
- The ScriptInfo
whose init method has required
arguments.methodInfo
- The MethodInfo
for the init method of the
specified ScriptInfo
.Copyright © 2016 The Apache Software Foundation. All rights reserved.