GrammarScope  4.0.0
Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
grammarscope.common.utils.Searcher Class Reference

Static Public Member Functions

static boolean isLoadableClass (final String className)
 
static Set< String > findClasses (final String pattern0)
 
static Map< String, String > findFiles (final String pattern0)
 
static String findClassPathItem (final String pattern0)
 
static boolean findCoreNlp ()
 
static boolean findCoreNlpModels ()
 
static List< String > findFileUrls (final String pattern)
 
static List< String > toUrls (final Map< String, String > map)
 
static void main (final String[] args)
 

Private Member Functions

 Searcher ()
 

Static Private Member Functions

static String makePattern (final String pattern0)
 
static Map< String, String > findInJarFile (final File file, final String pattern) throws IOException
 
static Map< String, String > findInDirectory (final File directory, final String pattern, final String pathElement) throws IOException
 

Static Private Attributes

static Boolean hasBeenFound
 

Detailed Description

Class searcher

Author
Walter Angerer 'greenhorn'
Bernard Bou

Constructor & Destructor Documentation

◆ Searcher()

grammarscope.common.utils.Searcher.Searcher ( )
private

Member Function Documentation

◆ findClasses()

static Set<String> grammarscope.common.utils.Searcher.findClasses ( final String  pattern0)
static

Find classes matching pattern in classpath

Parameters
pattern0pattern
Returns
result set

◆ findClassPathItem()

static String grammarscope.common.utils.Searcher.findClassPathItem ( final String  pattern0)
static

Find classpath item matching pattern in classpath

Parameters
pattern0pattern
Returns
found classpath element or null

◆ findCoreNlp()

static boolean grammarscope.common.utils.Searcher.findCoreNlp ( )
static

Find corenlp in classpath

Returns
true if found

◆ findCoreNlpModels()

static boolean grammarscope.common.utils.Searcher.findCoreNlpModels ( )
static

Find corenlp models in classpath

Returns
true if found

◆ findFiles()

static Map<String, String> grammarscope.common.utils.Searcher.findFiles ( final String  pattern0)
static

Find files matching pattern in classpath

Parameters
pattern0pattern
Returns
result set

◆ findFileUrls()

static List<String> grammarscope.common.utils.Searcher.findFileUrls ( final String  pattern)
static

Find files matching pattern in classpath

Parameters
patternpattern
Returns
list of urls

◆ findInDirectory()

static Map<String, String> grammarscope.common.utils.Searcher.findInDirectory ( final File  directory,
final String  pattern,
final String  pathElement 
) throws IOException
staticprivate

Find in directory

Parameters
directorydirectory
patternpattern
pathElementpath element
Returns
file with matching file path
Exceptions
IOExceptionexception

◆ findInJarFile()

static Map<String, String> grammarscope.common.utils.Searcher.findInJarFile ( final File  file,
final String  pattern 
) throws IOException
staticprivate

Find in JAR file

Parameters
fileJAR file
patternpattern
Returns
file with matching file path
Exceptions
IOExceptionexception

◆ isLoadableClass()

static boolean grammarscope.common.utils.Searcher.isLoadableClass ( final String  className)
static

◆ main()

static void grammarscope.common.utils.Searcher.main ( final String[]  args)
static

Main

Parameters
argsargs

◆ makePattern()

static String grammarscope.common.utils.Searcher.makePattern ( final String  pattern0)
staticprivate

Get file system pattern

Parameters
pattern0pattern
Returns
file system pattern

◆ toUrls()

static List<String> grammarscope.common.utils.Searcher.toUrls ( final Map< String, String >  map)
static

Convert file map to list of urls

Parameters
mappath to container map
Returns
list of urls

Member Data Documentation

◆ hasBeenFound

Boolean grammarscope.common.utils.Searcher.hasBeenFound
staticprivate

The documentation for this class was generated from the following file: