org.objectweb.speedo.generation.enhancer
Class Util

java.lang.Object
  extended byorg.objectweb.speedo.generation.enhancer.Util

public class Util
extends java.lang.Object

Utility class. Adapted from isPersistentType and isPersitentCapable in EnhancerTool.


Constructor Summary
Util()
           
 
Method Summary
static java.lang.Class getClass(org.objectweb.asm.Type type, java.lang.ClassLoader cl)
           
static java.lang.String getClassName(org.objectweb.asm.Type type)
           
static boolean isAutomaticPersistentType(java.lang.String desc, java.util.Collection xml)
           
static SpeedoClass isPersistentCapable(java.lang.String className, java.util.Collection xml)
          Tests whether a JDO Instance exists in the object model.
static boolean isPersistentType(java.lang.String desc, java.util.Collection xml)
          Tests whether a specific Type can be defined persistent.
static java.lang.String modifier(int access)
           
static java.lang.String type(org.objectweb.asm.Type type)
           
static void visitIntConstant(org.objectweb.asm.CodeVisitor cv, int value)
           
static void visitLongConstant(org.objectweb.asm.CodeVisitor cv, long value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

isPersistentType

public static boolean isPersistentType(java.lang.String desc,
                                       java.util.Collection xml)
Tests whether a specific Type can be defined persistent. The test of may be persistent type is based on JDO Specification.

Parameters:
desc - the descriptor of the type that is tested
xml - a collection of SpeedoXMLDescriptor
Returns:
true is the type can be defaulted as persistent, false either
See Also:
isPersistentCapable(java.lang.String, java.util.Collection)

isAutomaticPersistentType

public static boolean isAutomaticPersistentType(java.lang.String desc,
                                                java.util.Collection xml)

isPersistentCapable

public static SpeedoClass isPersistentCapable(java.lang.String className,
                                              java.util.Collection xml)
Tests whether a JDO Instance exists in the object model.

Parameters:
className - the complete name of the class
xml - a collection of SpeedoXMLDescriptor
Returns:
null if the class is not known as a persistent capable class

visitIntConstant

public static void visitIntConstant(org.objectweb.asm.CodeVisitor cv,
                                    int value)

visitLongConstant

public static void visitLongConstant(org.objectweb.asm.CodeVisitor cv,
                                     long value)

modifier

public static java.lang.String modifier(int access)

type

public static java.lang.String type(org.objectweb.asm.Type type)

getClass

public static java.lang.Class getClass(org.objectweb.asm.Type type,
                                       java.lang.ClassLoader cl)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getClassName

public static java.lang.String getClassName(org.objectweb.asm.Type type)