All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.jflex.plugin.maven.ClassInfo Maven / Gradle / Ivy

Go to download

This is a Maven 3 plugin to generate Lexer code in Java from a Lexer specification, using JFlex.

There is a newer version: 1.8.2
Show newest version
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * JFlex Maven3 plugin                                                     *
 * Copyright (c) 2007-2017  Régis Décamps            *
 * All rights reserved.                                                    *
 *                                                                         *
 * License: BSD                                                            *
 *                                                                         *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package de.jflex.plugin.maven;

import java.io.File;

class ClassInfo {
  String className = null;
  String packageName = null;

  /**
   * Returns the (relative) path name of the java source code file that corresponds to the class.
   *
   * 

For instance, "org.foo.Bar" returns "org/foo/Bar.java" * * @return Name of the java file. */ String getOutputFilename() { String packageDir = ""; if (packageName != null) { packageDir += packageName.replace('.', File.separatorChar); } if (packageDir.length() > 0) { packageDir += File.separatorChar; } return packageDir + className + ".java"; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy