public class GrepDelegator extends BaseDelegator implements IGrepDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION| Constructor and Description |
|---|
GrepDelegator(IOptionsServer server)
Instantiates a new grep delegator.
|
| Modifier and Type | Method and Description |
|---|---|
List<IFileLineMatch> |
getMatchingLines(List<IFileSpec> fileSpecs,
String pattern,
List<String> infoLines,
MatchingLinesOptions options)
Get list of matching lines in the specified file specs.
|
List<IFileLineMatch> |
getMatchingLines(List<IFileSpec> fileSpecs,
String pattern,
MatchingLinesOptions options)
Get list of matching lines in the specified file specs.
|
public GrepDelegator(IOptionsServer server)
server - the serverpublic List<IFileLineMatch> getMatchingLines(List<IFileSpec> fileSpecs, String pattern, MatchingLinesOptions options) throws P4JavaException
getMatchingLines in interface IGrepDelegatorfileSpecs - file specs to search for matching linespattern - non-null string pattern to be passed to the grep commandoptions - - Options to grep commandP4JavaException - if any error occurs in the processing of this method.public List<IFileLineMatch> getMatchingLines(@Nonnull List<IFileSpec> fileSpecs, @Nonnull String pattern, @Nullable List<String> infoLines, MatchingLinesOptions options) throws P4JavaException
This method allows the user to retrieve useful info and warning message lines the Perforce server may generate in response to things like encountering a too-long line, etc., by passing in a non-null infoLines parameter.
getMatchingLines in interface IGrepDelegatorfileSpecs - file specs to search for matching linespattern - non-null string pattern to be passed to the grep commandinfoLines - if not null, any "info" lines returned from the server (i.e.
warnings about exceeded line lengths, etc.) will be put into
the passed-in list in the order they are received.options - - Options to grep commandP4JavaException - if any error occurs in the processing of this method.Copyright © 2017 Perforce Software. All Rights Reserved.