@NotThreadSafe public class ModuleDeclarationMetrics extends CodeElementMetrics
Instances of this class are not safe for use by multiple threads without external synchronization.
| Constructor | Description |
|---|---|
ModuleDeclarationMetrics(java.lang.String pName,
boolean pIsOpen) |
Create a new
ModuleDeclarationMetrics. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(com.github.javaparser.ast.modules.ModuleExportsStmt pStatement) |
Add metrics of an
exports statement. |
void |
add(com.github.javaparser.ast.modules.ModuleOpensStmt pStatement) |
Add metrics of an
opens statement. |
void |
add(com.github.javaparser.ast.modules.ModuleProvidesStmt pStatement) |
Add metrics of a
provides statement. |
void |
add(com.github.javaparser.ast.modules.ModuleRequiresStmt pStatement) |
Add metrics of a
requires statement. |
void |
add(com.github.javaparser.ast.modules.ModuleUsesStmt pStatement) |
Add metrics of a
uses statement. |
int |
getNumExportsStatements() |
Get the number of
exports statements added to this instance. |
int |
getNumOpensStatements() |
Get the number of
opens statements added to this instance. |
int |
getNumProvidesStatements() |
Get the number of
provides statements added to this instance. |
int |
getNumRequiresStatements() |
Get the number of
requires statements added to this instance. |
int |
getNumUsesStatements() |
Get the number of
uses statements added to this instance. |
boolean |
isOpen() |
Is the module declared as open?
|
getComments, getNamepublic ModuleDeclarationMetrics(@Nonnull
java.lang.String pName,
boolean pIsOpen)
ModuleDeclarationMetrics.pName - The name of the module.pIsOpen - True if the module is an open module, false if not.java.lang.NullPointerException - if pName is null.public boolean isOpen()
public int getNumRequiresStatements()
requires statements added to this instance.requires statements.public int getNumExportsStatements()
exports statements added to this instance.exports statements.public int getNumProvidesStatements()
provides statements added to this instance.provides statements.public int getNumUsesStatements()
uses statements added to this instance.uses statements.public int getNumOpensStatements()
opens statements added to this instance.opens statements.public void add(@Nonnull
com.github.javaparser.ast.modules.ModuleRequiresStmt pStatement)
requires statement.pStatement - The statement.java.lang.NullPointerException - if pStatement is null.public void add(@Nonnull
com.github.javaparser.ast.modules.ModuleExportsStmt pStatement)
exports statement.pStatement - The statement.java.lang.NullPointerException - if pStatement is null.public void add(@Nonnull
com.github.javaparser.ast.modules.ModuleProvidesStmt pStatement)
provides statement.pStatement - The statement.java.lang.NullPointerException - if pStatement is null.public void add(@Nonnull
com.github.javaparser.ast.modules.ModuleUsesStmt pStatement)
uses statement.pStatement - The statement.java.lang.NullPointerException - if pStatement is null.public void add(@Nonnull
com.github.javaparser.ast.modules.ModuleOpensStmt pStatement)
opens statement.pStatement - The statement.java.lang.NullPointerException - if pStatement is null.