com.acciente.commons.loader
Interface ClassDef

All Known Implementing Classes:
JavaCompiledClassDef

public interface ClassDef

This interface abstracts access to a object capable of providing the byte codes for a java class definition. An example of such an object is a java source file, another example is a java class file.

Author:
Adinath Raveendra Raj

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
 

Method Detail

getClassName

String getClassName()
Returns a fully qualified class name of the that this object manages

Returns:
a string class name

isModified

boolean isModified()
Returns true if the underlying source of the class data has changed since the last call to getByteCode()

Returns:
true if changed, false otherwise

reload

void reload()
            throws ClassNotFoundException
Reloads the class byte code from the underlying class definition

Throws:
ClassNotFoundException

getByteCode

byte[] getByteCode()
This method loads and returns the the byte code for class from the underlying source.

Returns:

getBundledClassDefs

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

Returns:
if there are no bundled classes null is returned, otherwise an array of ClassDef objects is returned

getReferencedClasses

String[] getReferencedClasses()
Returns the names of the classes that the byte code has references

Returns:
a string array containing clasnames


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