Package org.apache.ivy.plugins.parser
Class AbstractModuleDescriptorParser.AbstractParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.AbstractParser
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
XmlModuleDescriptorParser.Parser
- Enclosing class:
- AbstractModuleDescriptorParser
protected abstract static class AbstractModuleDescriptorParser.AbstractParser
extends DefaultHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private String
private String
private DefaultDependencyDescriptor
private DefaultModuleDescriptor
private ModuleDescriptorParser
private Resource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
private void
addExtendingConfigurations
(String[] confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) private void
addExtendingConfigurations
(String conf, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) protected void
void
private String
Evaluate the optional condition in the given configuration, like "[org=MYORG]confX".void
protected String
protected String
protected DependencyDescriptor
protected Date
private String
Returns a string of the location.protected DefaultModuleDescriptor
getMd()
protected Resource
protected void
parseDepsConfs
(String[] conf, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) protected void
parseDepsConfs
(String[] confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) protected void
parseDepsConfs
(String confs, DefaultDependencyDescriptor dd) protected void
parseDepsConfs
(String confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) protected void
parseDepsConfs
(String confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) private void
protected void
setDefaultConf
(String defaultConf) protected void
setDefaultConfMapping
(String defaultConf) protected void
void
setResource
(Resource res) void
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl
-
Field Details
-
DEFAULT_CONF_MAPPING
- See Also:
-
defaultConf
-
defaultConfMapping
-
defaultConfMappingDescriptor
-
res
-
errors
-
md
-
parser
-
-
Constructor Details
-
AbstractParser
-
-
Method Details
-
getModuleDescriptorParser
-
checkErrors
- Throws:
ParseException
-
setResource
-
getResource
-
getDefaultConfMapping
-
setDefaultConfMapping
-
parseDepsConfs
-
parseDepsConfs
protected void parseDepsConfs(String confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) -
parseDepsConfs
protected void parseDepsConfs(String confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) -
parseDepsConfs
protected void parseDepsConfs(String[] conf, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) -
parseDepsConfs
protected void parseDepsConfs(String[] confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) -
evaluateCondition
Evaluate the optional condition in the given configuration, like "[org=MYORG]confX". If the condition evaluates to true, the configuration is returned, if the condition evaluates to false, null is returned. If there are no conditions, the configuration itself is returned.- Parameters:
conf
- the configuration to evaluatedd
- the dependency descriptor to which the configuration will be added- Returns:
- the evaluated condition
-
addExtendingConfigurations
private void addExtendingConfigurations(String[] confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) -
addExtendingConfigurations
private void addExtendingConfigurations(String conf, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) -
getDefaultConfMappingDescriptor
-
addError
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Overrides:
warning
in classDefaultHandler
-
error
- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Overrides:
fatalError
in classDefaultHandler
- Throws:
SAXException
-
getLocationString
Returns a string of the location. -
getDefaultConf
-
setDefaultConf
-
getModuleDescriptor
- Throws:
ParseException
-
getDefaultPubDate
-
replaceConfigurationWildcards
-
setMd
-
getMd
-