com.acciente.commons.loader
Class JavaCompiledClassDef

java.lang.Object
  extended by com.acciente.commons.loader.JavaCompiledClassDef
All Implemented Interfaces:
ClassDef

public class JavaCompiledClassDef
extends Object
implements ClassDef

An implementation of a ClassDef backed by compiled Java class files.

Author:
Adinath Raveendra Raj
See Also:
ClassDef

Method Summary
 ClassDef[] getBundledClassDefs()
          Returns the definitions of any non-public package, private, or inner classes that came the this class
 byte[] getByteCode()
          This method loads and returns the the byte code for class from the underlying source.
 String getClassName()
          Returns a fully qualified class name of the that this object manages
 String[] getReferencedClasses()
          Returns the names of the classes that the byte code has references
 boolean isModified()
          Returns true if the underlying source of the class data has changed since the last call to getByteCode()
 void reload()
          Reloads the class byte code from the underlying class definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClassName

public String getClassName()
Description copied from interface: ClassDef
Returns a fully qualified class name of the that this object manages

Specified by:
getClassName in interface ClassDef
Returns:
a string class name

isModified

public boolean isModified()
Description copied from interface: ClassDef
Returns true if the underlying source of the class data has changed since the last call to getByteCode()

Specified by:
isModified in interface ClassDef
Returns:
true if changed, false otherwise

reload

public void reload()
            throws ClassNotFoundException
Description copied from interface: ClassDef
Reloads the class byte code from the underlying class definition

Specified by:
reload in interface ClassDef
Throws:
ClassNotFoundException

getByteCode

public byte[] getByteCode()
Description copied from interface: ClassDef
This method loads and returns the the byte code for class from the underlying source.

Specified by:
getByteCode in interface ClassDef
Returns:

getBundledClassDefs

public ClassDef[] getBundledClassDefs()
Description copied from interface: ClassDef
Returns the definitions of any non-public package, private, or inner classes that came the this class

Specified by:
getBundledClassDefs in interface ClassDef
Returns:
if there are no bundled classes null is returned, otherwise an array of ClassDef objects is returned

getReferencedClasses

public String[] getReferencedClasses()
Description copied from interface: ClassDef
Returns the names of the classes that the byte code has references

Specified by:
getReferencedClasses in interface ClassDef
Returns:
a string array containing clasnames


Copyright © 2008-2013 Acciente, LLC. All Rights Reserved.