org.apache.openjpa.persistence.meta
Class AnnotationProcessor6.OutputPath

java.lang.Object
  extended by org.apache.openjpa.persistence.meta.AnnotationProcessor6.OutputPath
Enclosing class:
AnnotationProcessor6

public static class AnnotationProcessor6.OutputPath
extends 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

Constructor Summary
AnnotationProcessor6.OutputPath()
           
 
Method Summary
static 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 String getPackageName(String s)
           
static File getParentFile(File f, int n)
          Gets the parent of the given file recursively traversing to given number of levels.
static String getSimpleName(String s)
           
static int packageDepth(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationProcessor6.OutputPath

public AnnotationProcessor6.OutputPath()
Method Detail

getAbsoluteDirectory

public static 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 File getParentFile(File f,
                                 int n)
Gets the parent of the given file recursively traversing to given number of levels.


packageDepth

public static int packageDepth(String s)

getPackageName

public static String getPackageName(String s)

getSimpleName

public static String getSimpleName(String s)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.