public class FileRule<ParentRules extends FileRuleSet>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
myFromFull |
protected java.lang.String |
myFromPath |
| Constructor and Description |
|---|
FileRule(java.lang.String from,
ParentRules parentRules,
boolean isInclude) |
FileRule(java.lang.String from,
ParentRules parentRules,
boolean isInclude,
boolean usePattern) |
FileRule(java.lang.String fromPath,
java.lang.String additionalProperties,
ParentRules parentRules,
boolean isInclude) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
createPatternString(java.lang.String from) |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalProperties() |
java.lang.String |
getFrom() |
java.lang.String |
getMatchedHead(java.lang.String path)
returns matched head path without trailing wildcards if matched with path, null otherwise
|
ParentRules |
getParentRules() |
protected java.util.regex.Pattern |
getPattern() |
java.lang.String |
getProperty(java.lang.String propName) |
boolean |
isAbsolutePath() |
boolean |
isIsInclude() |
boolean |
isRoot() |
protected java.lang.String |
preparePathWithLowercase(java.lang.String path) |
boolean |
propertiesMatch(java.util.Map<java.lang.String,java.lang.String> props) |
java.lang.String |
toString() |
protected final java.lang.String myFromPath
protected final java.lang.String myFromFull
public FileRule(@NotNull
java.lang.String from,
ParentRules parentRules,
boolean isInclude)
public FileRule(@NotNull
java.lang.String from,
ParentRules parentRules,
boolean isInclude,
boolean usePattern)
from - from part of the ruleparentRules - parent rulesisInclude - true if it is an include ruleusePattern - true if regexp pattern should be used to match paths (can be slow and require more memory),
false if pattern shouldn't be created and ancestor of this class does all the matching in
the overridden getMatchedHead(java.lang.String) methodpublic FileRule(@NotNull
java.lang.String fromPath,
@Nullable
java.lang.String additionalProperties,
ParentRules parentRules,
boolean isInclude)
@Nullable protected java.util.regex.Pattern getPattern()
@NotNull
protected java.lang.String createPatternString(@NotNull
java.lang.String from)
public java.lang.String getFrom()
public ParentRules getParentRules()
public boolean isIsInclude()
public java.lang.String toString()
toString in class java.lang.Object@Nullable
public java.lang.String getMatchedHead(@NotNull
java.lang.String path)
path - file path to match with@Nullable public java.lang.String getProperty(java.lang.String propName)
public boolean propertiesMatch(java.util.Map<java.lang.String,java.lang.String> props)
@Nullable public java.util.Map<java.lang.String,java.lang.String> getAdditionalProperties()
public boolean isAbsolutePath()
public boolean isRoot()
@NotNull
protected java.lang.String preparePathWithLowercase(@Nullable
java.lang.String path)