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 Stringprivate Stringprivate Stringprivate DefaultDependencyDescriptorprivate DefaultModuleDescriptorprivate ModuleDescriptorParserprivate Resource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprivate voidaddExtendingConfigurations(String[] confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) private voidaddExtendingConfigurations(String conf, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) protected voidvoidprivate StringEvaluate the optional condition in the given configuration, like "[org=MYORG]confX".voidprotected Stringprotected Stringprotected DependencyDescriptorprotected Dateprivate StringReturns a string of the location.protected DefaultModuleDescriptorgetMd()protected Resourceprotected voidparseDepsConfs(String[] conf, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) protected voidparseDepsConfs(String[] confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) protected voidparseDepsConfs(String confs, DefaultDependencyDescriptor dd) protected voidparseDepsConfs(String confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand) protected voidparseDepsConfs(String confs, DefaultDependencyDescriptor dd, boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) private voidprotected voidsetDefaultConf(String defaultConf) protected voidsetDefaultConfMapping(String defaultConf) protected voidvoidsetResource(Resource res) voidMethods 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:
warningin interfaceErrorHandler- Overrides:
warningin classDefaultHandler
-
error
- Specified by:
errorin interfaceErrorHandler- Overrides:
errorin classDefaultHandler
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Overrides:
fatalErrorin classDefaultHandler- Throws:
SAXException
-
getLocationString
Returns a string of the location. -
getDefaultConf
-
setDefaultConf
-
getModuleDescriptor
- Throws:
ParseException
-
getDefaultPubDate
-
replaceConfigurationWildcards
-
setMd
-
getMd
-