public abstract class AbstractStructureNode<T> extends Object implements StructureNode<T>
| Modifier and Type | Field and Description |
|---|---|
protected AbstractStructureNode[] |
childs |
protected T |
content |
protected boolean |
detailEnabled |
| Constructor and Description |
|---|
AbstractStructureNode(T content,
boolean detailEnabled) |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getDetailedName() |
String |
getHeader()
Header of output
|
String |
getName()
if detailed output is not asked then it will call
StructureNode.getNodeName() else it will return full details |
abstract String |
getNodeName()
Returns file.name or artifactId for maven project
|
String |
getOutput(String levelStr)
Returns tree output just for this node
|
boolean |
hasMoreChilds(int index,
String[] ignores)
Utility method for below case:
While you are iterating you know that you know there is more files but you are not sure if those files needs to be ignored.
|
boolean |
isEmpty() |
boolean |
isValid(String[] ignores,
String... parentName)
Regex validation for single node
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChilds, getParentNameprotected AbstractStructureNode[] childs
protected T content
protected boolean detailEnabled
public AbstractStructureNode(T content, boolean detailEnabled) throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureExceptionpublic String getName() throws org.apache.maven.plugin.MojoFailureException
StructureNodeStructureNode.getNodeName() else it will return full detailsgetName in interface StructureNode<T>org.apache.maven.plugin.MojoFailureExceptionpublic boolean hasMoreChilds(int index,
String[] ignores)
throws org.apache.maven.plugin.MojoFailureException
StructureNodehasMoreChilds in interface StructureNode<T>index - current index of iteration so the rest will be handledignores - regex patternsBooleanorg.apache.maven.plugin.MojoFailureExceptionpublic boolean isValid(String[] ignores, String... parentName)
StructureNodeisValid in interface StructureNode<T>ignores - regex patternsparentName - this is for modules to validate if they are not printed multiple time referring to their parentBooleanpublic boolean isEmpty()
throws org.apache.maven.plugin.MojoFailureException
isEmpty in interface StructureNode<T>org.apache.maven.plugin.MojoFailureExceptionpublic abstract String getNodeName()
StructureNodegetNodeName in interface StructureNode<T>Stringpublic abstract String getDetailedName() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureExceptionpublic String getOutput(String levelStr) throws org.apache.maven.plugin.MojoFailureException
Printablepublic String getHeader() throws org.apache.maven.plugin.MojoFailureException
StructureNodegetHeader in interface StructureNode<T>Stringorg.apache.maven.plugin.MojoFailureExceptionCopyright © 2015. All rights reserved.