GrammarScope  4.0.0
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Package Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
grammarscope.generator.codedeps.Resolver Class Reference
Collaboration diagram for grammarscope.generator.codedeps.Resolver:
Collaboration graph
[legend]

Classes

interface  IProcessor
 
enum  ResultType
 

Public Member Functions

 Resolver (final String thisVersion, final String thisPhase, final String thisLocalRepository)
 
Collection< Artifact > resolve (final String thisScope, final String... theseNames) throws DependencyResolutionException
 
Artifact resolve1 (final Artifact thisArtifact) throws DependencyResolutionException
 
Map< String, Collection< Artifact > > getDependencies () throws DependencyResolutionException
 
Map< String, Collection< Artifact > > getDependencies (final String thisPhase) throws DependencyResolutionException
 
Properties getProperties (final Map< String, Collection< Artifact >> thisDependenciesMap, final ResultType thisResultType)
 

Static Public Member Functions

static boolean saveSettings (final String thisFilePath, final Properties theseSettings)
 
static void main (final String[] args) throws DependencyResolutionException
 

Public Attributes

final String theVersion
 
final String thePhase
 
final String theLocalRepository
 

Static Public Attributes

static String theCoreNlpVersion = "4.0.0"
 
static String theParserVersion = "4.0.0"
 
static Map< String, String[]> theMap = new HashMap<String, String[]>()
 

Static Package Functions

 [static initializer]
 
static public< T > String join (final String thisGlue, final IProcessor< T > thisProcessor, final Collection< T > theseObjects)
 

Static Private Member Functions

static void store (final Properties theseProperties, final OutputStream thisOut, final String theseComments) throws IOException
 
static String saveConvert (String theString, boolean escapeSpace, boolean escapeUnicode)
 
static char toHex (int nibble)
 
static void addSlf4jImpl (final Map< String, Collection< Artifact >> thisDependenciesMap)
 

Private Attributes

final Aether theAether
 
final IProcessor< Artifact > toId
 
final IProcessor< Artifact > toFile
 
final IProcessor< Artifact > toPath
 

Static Private Attributes

static final char[] hexDigit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }
 

Constructor & Destructor Documentation

◆ Resolver()

grammarscope.generator.codedeps.Resolver.Resolver ( final String  thisVersion,
final String  thisPhase,
final String  thisLocalRepository 
)

Member Function Documentation

◆ [static initializer]()

grammarscope.generator.codedeps.Resolver.[static initializer]
staticpackage

◆ addSlf4jImpl()

static void grammarscope.generator.codedeps.Resolver.addSlf4jImpl ( final Map< String, Collection< Artifact >>  thisDependenciesMap)
staticprivate

◆ getDependencies() [1/2]

Map<String, Collection<Artifact> > grammarscope.generator.codedeps.Resolver.getDependencies ( ) throws DependencyResolutionException

Get dependencies

Returns
map of dependencies
Exceptions
DependencyResolutionExceptionexception

◆ getDependencies() [2/2]

Map<String, Collection<Artifact> > grammarscope.generator.codedeps.Resolver.getDependencies ( final String  thisPhase) throws DependencyResolutionException

Get dependencies

Parameters
thisPhasephase (compile,runtime)
Returns
map of dependencies
Exceptions
DependencyResolutionExceptionexception

◆ getProperties()

Properties grammarscope.generator.codedeps.Resolver.getProperties ( final Map< String, Collection< Artifact >>  thisDependenciesMap,
final ResultType  thisResultType 
)

Get properties

Parameters
thisDependenciesMapmap of dependencies
thisResultTyperesult type
Returns
properties
Exceptions
DependencyResolutionExceptionexception

◆ join()

static public<T> String grammarscope.generator.codedeps.Resolver.join ( final String  thisGlue,
final IProcessor< T >  thisProcessor,
final Collection< T >  theseObjects 
)
staticpackage

Join string array

Parameters
thisGluestring glue
thisProcessorprocessor
theseObjectsobject array
<T>processor result type
Returns
string

◆ main()

static void grammarscope.generator.codedeps.Resolver.main ( final String[]  args) throws DependencyResolutionException
static

◆ resolve()

Collection<Artifact> grammarscope.generator.codedeps.Resolver.resolve ( final String  thisScope,
final String...  theseNames 
) throws DependencyResolutionException

◆ resolve1()

Artifact grammarscope.generator.codedeps.Resolver.resolve1 ( final Artifact  thisArtifact) throws DependencyResolutionException

◆ saveConvert()

static String grammarscope.generator.codedeps.Resolver.saveConvert ( String  theString,
boolean  escapeSpace,
boolean  escapeUnicode 
)
staticprivate

◆ saveSettings()

static boolean grammarscope.generator.codedeps.Resolver.saveSettings ( final String  thisFilePath,
final Properties  theseSettings 
)
static

Save persist data

Parameters
thisFilePathpersist file
theseSettingssettings to persist
Returns
true if successful

◆ store()

static void grammarscope.generator.codedeps.Resolver.store ( final Properties  theseProperties,
final OutputStream  thisOut,
final String  theseComments 
) throws IOException
staticprivate

◆ toHex()

static char grammarscope.generator.codedeps.Resolver.toHex ( int  nibble)
staticprivate

Convert a nibble to a hex character

Parameters
nibblethe nibble to convert.

Member Data Documentation

◆ hexDigit

final char [] grammarscope.generator.codedeps.Resolver.hexDigit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }
staticprivate

A table of hex digits

◆ theAether

final Aether grammarscope.generator.codedeps.Resolver.theAether
private

◆ theCoreNlpVersion

String grammarscope.generator.codedeps.Resolver.theCoreNlpVersion = "4.0.0"
static

◆ theLocalRepository

final String grammarscope.generator.codedeps.Resolver.theLocalRepository

◆ theMap

Map<String, String[]> grammarscope.generator.codedeps.Resolver.theMap = new HashMap<String, String[]>()
static

◆ theParserVersion

String grammarscope.generator.codedeps.Resolver.theParserVersion = "4.0.0"
static

◆ thePhase

final String grammarscope.generator.codedeps.Resolver.thePhase

◆ theVersion

final String grammarscope.generator.codedeps.Resolver.theVersion

◆ toFile

final IProcessor<Artifact> grammarscope.generator.codedeps.Resolver.toFile
private
Initial value:
= new IProcessor<Artifact>()
{
@Override
public String process(final Artifact a)
{
if (a.getFile() == null)
{
System.err.println("RESOLVING " + a);
try
{
final Artifact a1 = resolve1(a);
return a1.getFile().getName();
}
catch (final DependencyResolutionException e)
{
return null;
}
}
return a.getFile().getName();
}
}

◆ toId

final IProcessor<Artifact> grammarscope.generator.codedeps.Resolver.toId
private
Initial value:
= new IProcessor<Artifact>()
{
@Override
public String process(final Artifact a)
{
return a.toString();
}
}

◆ toPath

final IProcessor<Artifact> grammarscope.generator.codedeps.Resolver.toPath
private
Initial value:
= new IProcessor<Artifact>()
{
@Override
public String process(final Artifact a)
{
String thisPath = null;
if (a.getFile() == null)
{
System.err.println("RESOLVING " + a);
try
{
final Artifact a1 = resolve1(a);
thisPath = a1.getFile().getName();
}
catch (final DependencyResolutionException e)
{
return null;
}
}
else
{
thisPath = a.getFile().toString();
}
thisPath = thisPath.replaceAll(Resolver.this.theLocalRepository, "\\${repository}");
return thisPath;
}
}

The documentation for this class was generated from the following file:
grammarscope.generator.codedeps.Resolver.resolve1
Artifact resolve1(final Artifact thisArtifact)
Definition: Resolver.java:114
grammarscope.generator.codedeps.Resolver.Resolver
Resolver(final String thisVersion, final String thisPhase, final String thisLocalRepository)
Definition: Resolver.java:83