org.milyn.classpath
Class ClasspathUtils

java.lang.Object
  extended by org.milyn.classpath.ClasspathUtils

public abstract class ClasspathUtils
extends Object

Classpath manipulation utility methods.

Author:
tfennelly

Constructor Summary
ClasspathUtils()
           
 
Method Summary
static String toClassName(String fileName)
          Convert the Java-class-file-name to the equivalent Java-class-name (dot delimited package name).
static String toFileName(String className)
          Convert the Java-class-name (dot delimited package name)to the equivalent Java-class-file-name .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathUtils

public ClasspathUtils()
Method Detail

toClassName

public static String toClassName(String fileName)
Convert the Java-class-file-name to the equivalent Java-class-name (dot delimited package name).

EG:
a/b/c/X.class converts to a.b.c.X
a/b/c/X converts to a.b.c.X
a.b.c.X converts to a.b.c.X
a.b.c.X.class converts to a.b.c.X

Parameters:
fileName - The file name String to be translated.
Returns:
Java Class runtime name representation of the supplied file name String.

toFileName

public static String toFileName(String className)
Convert the Java-class-name (dot delimited package name)to the equivalent Java-class-file-name .

EG:
a.b.c.X converts to a/b/c/X.class
a.b.c.X.class converts to a/b/c/X.class
a/b/c/X.class converts to a/b/c/X.class
a/b/c/X converts to a/b/c/X.class

Parameters:
className - The class name string to be translated.
Returns:
The file name representaion of the supplied runtime class String.


Copyright © 2018. All rights reserved.