public class ContractElementVisitor
extends BaseVisitor
implements ASTNodeMetaData
Checks whether the given ClassNode is relevant for further processing.
| Fields inherited from class | Fields |
|---|---|
class BaseVisitor |
GCONTRACTS_ENABLED_VAR, sourceUnit |
| Constructor and description |
|---|
ContractElementVisitor(SourceUnit sourceUnit, ReaderSource source)Creates a visitor that detects whether a class participates in contract processing. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
isFoundContractElement()Indicates whether any contract element was detected while traversing the class hierarchy. |
|
public void |
visitClass(ClassNode node)Visits the supplied class and its hierarchy until any contract element is found. |
|
protected void |
visitConstructorOrMethod(MethodNode methodNode, boolean isConstructor)Checks whether the visited constructor or method already has rewritten contract metadata. |
Creates a visitor that detects whether a class participates in contract processing.
sourceUnit - the source unit currently being transformedsource - the reader source backing the source unitIndicates whether any contract element was detected while traversing the class hierarchy.
true once a contract element has been foundVisits the supplied class and its hierarchy until any contract element is found.
node - the class to inspectChecks whether the visited constructor or method already has rewritten contract metadata.
methodNode - the method or constructor being inspectedisConstructor - whether the node represents a constructorCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.