View Javadoc

1   /*
2    CppProgrammingLanguage.java
3    Creation date : 19/06/2010
4    Copyright © Benjamin Croizet (graffity2199@yahoo.fr)
5   
6    This program is free software; you can redistribute it and/or
7    modify it under the terms of the GNU General Public License
8    or GNU Lesser General Public License as published by the
9    Free Software Foundation; either version 3 of the License,
10   or (at your option) any later version.
11  
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16  
17   You should have received copies of the GNU General Public License
18   and GNU Lesser General Public License along with this program;
19   if not, write to the Free Software Foundation, Inc.,
20   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21   http://www.fsf.org/licensing/licenses/gpl.html
22   http://www.gnu.org/licenses/lgpl.html
23   */
24  
25  package net.sourceforge.plantumldependency.cli.main.option.programminglanguage.argument;
26  
27  import static net.sourceforge.plantumldependency.cli.constants.log.ErrorConstants.CPP_NOT_IMPLEMENTED_YET_ERROR;
28  
29  import java.util.Set;
30  import java.util.regex.Pattern;
31  
32  import net.sourceforge.plantumldependency.cli.generic.GenericDependency;
33  import net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType;
34  import net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.ProgrammingLanguageContext;
35  import net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.CppProgrammingLanguageContext;
36  
37  /**
38   * The C++ {@link ProgrammingLanguage} implementation.
39   *
40   * @author Benjamin Croizet (<a href="mailto:graffity2199@yahoo.fr>graffity2199@yahoo.fr</a>)
41   * @since 1.0.0
42   * @version 1.4.0
43   */
44  class CppProgrammingLanguage extends ProgrammingLanguage {
45  
46      /** Serial version UID. */
47      private static final long serialVersionUID = 5226406064459624517L;
48  
49      /**
50       * Default constructor.
51       *
52       * @param programmingLanguageName
53       *            the programming language name to get the instance from, mustn't be
54       *            <code>null</code> nor empty.
55       * @since 1.0.0
56       */
57      protected CppProgrammingLanguage(final String programmingLanguageName) {
58          super(programmingLanguageName);
59      }
60  
61      /**
62       * {@inheritDoc}
63       *
64       * @since 1.0.0
65       */
66      @Override
67      public ProgrammingLanguageContext createNewContext(final Set < DisplayType > displayTypesOpts,
68              final Pattern displayPackageNamePattern, final Pattern displayNamePattern) {
69          return new CppProgrammingLanguageContext(displayTypesOpts, displayPackageNamePattern, displayNamePattern);
70      }
71  
72      /**
73       * {@inheritDoc}
74       *
75       * @since 1.0.0
76       */
77      @Override
78      public GenericDependency readDependencyFromFile(final String sourceFileContent,
79              final ProgrammingLanguageContext programmingLanguageContext) {
80          throw new UnsupportedOperationException(CPP_NOT_IMPLEMENTED_YET_ERROR);
81      }
82  }