org.apache.openjpa.persistence.meta
Class AnnotationProcessor6.OutputPath
java.lang.Object
org.apache.openjpa.persistence.meta.AnnotationProcessor6.OutputPath
- Enclosing class:
- AnnotationProcessor6
public static class AnnotationProcessor6.OutputPath
- extends java.lang.Object
An utility class to determine the source file corresponding to a TypeElement.
The utility uses Sun JDK internal API (com.sun.tools.*) and hence works reflectively
to avoid compile-time dependency.
- Author:
- Pinaki Poddar
|
Method Summary |
static java.io.File |
getAbsoluteDirectory(javax.annotation.processing.ProcessingEnvironment env,
javax.lang.model.element.TypeElement e)
Gets the directory relative to the Java source file corresponding to the TypeElement. |
static java.lang.String |
getPackageName(java.lang.String s)
|
static java.io.File |
getParentFile(java.io.File f,
int n)
Gets the parent of the given file recursively traversing to given number of levels. |
static java.lang.String |
getSimpleName(java.lang.String s)
|
static int |
packageDepth(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationProcessor6.OutputPath
public AnnotationProcessor6.OutputPath()
getAbsoluteDirectory
public static java.io.File getAbsoluteDirectory(javax.annotation.processing.ProcessingEnvironment env,
javax.lang.model.element.TypeElement e)
- Gets the directory relative to the Java source file corresponding to the TypeElement.
- Returns:
- null if the com.sun.source.util.* package is not available or the given TypeElement
does not correspond to a compilation unit associated to a source file.
getParentFile
public static java.io.File getParentFile(java.io.File f,
int n)
- Gets the parent of the given file recursively traversing to given number of levels.
packageDepth
public static int packageDepth(java.lang.String s)
getPackageName
public static java.lang.String getPackageName(java.lang.String s)
getSimpleName
public static java.lang.String getSimpleName(java.lang.String s)
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.