Class AtomParser


  • public class AtomParser
    extends java.lang.Object
    Parses the atom token stream into an internal model, which can be emitted as a Maven model.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int i  
      private java.util.logging.Logger log  
      private org.apache.maven.model.building.ModelSource modelSource  
      private java.util.List<Token> tokens  
    • Constructor Summary

      Constructors 
      Constructor Description
      AtomParser​(org.apache.maven.model.building.ModelSource modelSource, java.util.List<Token> tokens)  
    • Field Detail

      • log

        private final java.util.logging.Logger log
      • tokens

        private final java.util.List<Token> tokens
      • modelSource

        private final org.apache.maven.model.building.ModelSource modelSource
      • i

        private int i
    • Constructor Detail

      • AtomParser

        public AtomParser​(org.apache.maven.model.building.ModelSource modelSource,
                          java.util.List<Token> tokens)
    • Method Detail

      • parseException

        private void parseException​(java.lang.String message,
                                    java.lang.Throwable t)
      • parseException

        private void parseException​(java.lang.String message)
      • project

        private Project project​(Repositories repositories)
        Parsing rule for a single project build definition. project := 'project' STRING (AT URL)? ('as' PACKAGING)? EOL (idFragment COLON list EOL)+
      • srcs

        private java.util.Map<java.lang.String,​java.lang.String> srcs()
        Custom directory structure for maven builds.
      • dependencies

        private java.util.List<Id> dependencies​(Token.Kind kind,
                                                boolean allowNullVersion)
        Dependencies of a project. The real meat of it.
      • plugins

        private java.util.List<org.apache.maven.model.Plugin> plugins​(Token.Kind keyword)
        Additional plugins and their configuration.
      • plugin

        private org.apache.maven.model.Plugin plugin​(Token.Kind keyword)
      • toXpp3DomTree

        private org.codehaus.plexus.util.xml.Xpp3Dom toXpp3DomTree​(java.lang.String name,
                                                                   java.util.Map<java.lang.String,​java.lang.Object> config)
      • configurationMap

        private java.util.Map<java.lang.String,​java.lang.Object> configurationMap()
      • stripQuotes

        static java.lang.String stripQuotes​(java.lang.String atom)
      • modules

        private java.util.List<java.lang.String> modules()
      • classifier

        private java.lang.String classifier()
        classifier := LPAREN IDENT RPAREN
      • property

        private Property property()
      • id

        private Id id()
        Id of a project definition.

        id := IDENT (DOT IDENT)* COLON IDENT (COLON IDENT)? EOL

      • id

        private Id id​(boolean allowNullVersion)
      • parent

        private org.apache.maven.model.Parent parent()
      • relativePath

        private java.lang.String relativePath()
      • idFragment

        private java.lang.String idFragment()
      • repositories

        private Repositories repositories()
        Optional repositories declaration at the top of the file.

        repositories := 'repositories' LEFT_WAVE STRING (COMMA STRING)*

      • validateUrl

        private java.lang.String validateUrl​(java.lang.String url)
      • indent

        private void indent()
      • chewEols

        private void chewEols()
      • chewIndents

        private void chewIndents()