Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.chaoswg.xtc4y
Class AbstractClassImplementor  view AbstractClassImplementor download AbstractClassImplementor.java

java.lang.Object
  extended bycom.chaoswg.xtc4y.AbstractClassImplementor

public class AbstractClassImplementor
extends java.lang.Object

This class is used to implement an abstract class for testing purposes. It creates a subclass of it which implements all abstract methods


Field Summary
private  com.chaoswg.xtc4y.classloaders.ByteArrayClassLoader loader
           
private  boolean writeGeneratedFile
           
 
Constructor Summary
AbstractClassImplementor()
          Construct a new AbstractClassLoad
AbstractClassImplementor(boolean writeOutput)
          Construct a new AbstractClassImplementor
 
Method Summary
private  com.chaoswg.xtc4y.classdesc.code.instructions.Instruction getArrayLoadInstruction(java.lang.Class type)
           
private  java.lang.String getBaseType(java.lang.Class cl)
           
private  com.chaoswg.xtc4y.classdesc.MethodInfo getConstructorImplementation(java.lang.reflect.Constructor cons, com.chaoswg.xtc4y.classdesc.ClassCPEntry superCl)
           
protected  com.chaoswg.xtc4y.classdesc.CodeAttribute getDefaultAttribute(java.lang.Class ret)
           
private  java.lang.String getDescriptor(java.lang.Class[] params, java.lang.Class ret)
           
 java.lang.Class getImplementedClass(java.lang.Class orig)
          Get an implementation of the abstract class referenced by the class object
 java.lang.Class getImplementedClass(java.lang.String name)
          Get an implementation of the abstract class referenced by the name
private  com.chaoswg.xtc4y.classdesc.code.instructions.Instruction getLoadInstruction(java.lang.Class type, int index)
           
private  com.chaoswg.xtc4y.classdesc.MethodInfo getMethodImplementation(java.lang.reflect.Method method)
           
private  com.chaoswg.xtc4y.classdesc.code.instructions.Instruction getReturnInstruction(java.lang.Class ret)
           
private  void writeClassFile(byte[] bytes, java.lang.String name)
          Write an array of bytes into an output file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writeGeneratedFile

private boolean writeGeneratedFile

loader

private com.chaoswg.xtc4y.classloaders.ByteArrayClassLoader loader
Constructor Detail

AbstractClassImplementor

public AbstractClassImplementor()
Construct a new AbstractClassLoad


AbstractClassImplementor

public AbstractClassImplementor(boolean writeOutput)
Construct a new AbstractClassImplementor

Method Detail

getImplementedClass

public java.lang.Class getImplementedClass(java.lang.String name)
                                    throws java.lang.ClassNotFoundException
Get an implementation of the abstract class referenced by the name


getImplementedClass

public java.lang.Class getImplementedClass(java.lang.Class orig)
                                    throws java.lang.ClassNotFoundException
Get an implementation of the abstract class referenced by the class object


getDescriptor

private java.lang.String getDescriptor(java.lang.Class[] params,
                                       java.lang.Class ret)

getBaseType

private java.lang.String getBaseType(java.lang.Class cl)

getConstructorImplementation

private com.chaoswg.xtc4y.classdesc.MethodInfo getConstructorImplementation(java.lang.reflect.Constructor cons,
                                                                            com.chaoswg.xtc4y.classdesc.ClassCPEntry superCl)

getLoadInstruction

private com.chaoswg.xtc4y.classdesc.code.instructions.Instruction getLoadInstruction(java.lang.Class type,
                                                                                     int index)

getArrayLoadInstruction

private com.chaoswg.xtc4y.classdesc.code.instructions.Instruction getArrayLoadInstruction(java.lang.Class type)

getReturnInstruction

private com.chaoswg.xtc4y.classdesc.code.instructions.Instruction getReturnInstruction(java.lang.Class ret)

getMethodImplementation

private com.chaoswg.xtc4y.classdesc.MethodInfo getMethodImplementation(java.lang.reflect.Method method)

getDefaultAttribute

protected com.chaoswg.xtc4y.classdesc.CodeAttribute getDefaultAttribute(java.lang.Class ret)

writeClassFile

private void writeClassFile(byte[] bytes,
                            java.lang.String name)
                     throws java.io.IOException
Write an array of bytes into an output file