com.cisco.oss.foundation.logging.structured
Class AbstractFoundationLoggingMarker.ClassFileManager

java.lang.Object
  extended by javax.tools.ForwardingJavaFileManager<StandardJavaFileManager>
      extended by com.cisco.oss.foundation.logging.structured.AbstractFoundationLoggingMarker.ClassFileManager
All Implemented Interfaces:
Closeable, Flushable, JavaFileManager, OptionChecker
Enclosing class:
AbstractFoundationLoggingMarker

public static class AbstractFoundationLoggingMarker.ClassFileManager
extends ForwardingJavaFileManager<StandardJavaFileManager>


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.tools.JavaFileManager
JavaFileManager.Location
 
Field Summary
 
Fields inherited from class javax.tools.ForwardingJavaFileManager
fileManager
 
Constructor Summary
AbstractFoundationLoggingMarker.ClassFileManager(StandardJavaFileManager standardManager)
          Will initialize the manager with the specified standard java file manager
 
Method Summary
 ClassLoader getClassLoader(JavaFileManager.Location location)
          Will be used by us to get the class loader for our compiled class.
 JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
          Gives the compiler an instance of the JavaClassObject so that the compiler can write the byte code into it.
 
Methods inherited from class javax.tools.ForwardingJavaFileManager
close, flush, getFileForInput, getFileForOutput, getJavaFileForInput, handleOption, hasLocation, inferBinaryName, isSameFile, isSupportedOption, list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFoundationLoggingMarker.ClassFileManager

public AbstractFoundationLoggingMarker.ClassFileManager(StandardJavaFileManager standardManager)
Will initialize the manager with the specified standard java file manager

Parameters:
standardManager -
Method Detail

getClassLoader

public ClassLoader getClassLoader(JavaFileManager.Location location)
Will be used by us to get the class loader for our compiled class. It creates an anonymous class extending the SecureClassLoader which uses the byte code created by the compiler and stored in the JavaClassObject, and returns the Class for it

Specified by:
getClassLoader in interface JavaFileManager
Overrides:
getClassLoader in class ForwardingJavaFileManager<StandardJavaFileManager>

getJavaFileForOutput

public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location,
                                           String className,
                                           JavaFileObject.Kind kind,
                                           FileObject sibling)
                                    throws IOException
Gives the compiler an instance of the JavaClassObject so that the compiler can write the byte code into it.

Specified by:
getJavaFileForOutput in interface JavaFileManager
Overrides:
getJavaFileForOutput in class ForwardingJavaFileManager<StandardJavaFileManager>
Throws:
IOException


Copyright © 2014 Cisco. All Rights Reserved.