ariba.util.fieldvalue
Class CompiledAccessorFactory

java.lang.Object
  extended by ariba.util.fieldvalue.CompiledAccessorFactory

public class CompiledAccessorFactory
extends Object

CompiledAccessorFactory creates instances of CompiledAccessor given either a java.lang.reflect.Field or java.lang.reflect.Method. For Field, both the setter and getter methods are generated, but for Method, only the appropriate getter or setter method is generated, depending upon if the Method is for a Setter or Getter. The CompiledAccessor's are cached and are only created once for for each Field or Method. This class employs the Apache Jakarta project's BCEL (Byte Code Engineering Library) to generate the classes at runtime. Also, a custom ClassLoader (ByteArrayClassLoader) has been created to allow for loading the newly created classes without wirting anything to disk.


Nested Class Summary
static class CompiledAccessorFactory.ByteArrayClassLoader
           
 
Field Summary
static int AccessThresholdCurrent
          Deprecated. use setAccessThresholdToCompile(int)
static int AccessThresholdToCompile
          Deprecated. use setAccessThresholdToCompile(int)
static boolean VerboseEnabled
           
 
Constructor Summary
CompiledAccessorFactory()
           
 
Method Summary
static void _setAccessThresholdToCompile(int integer)
           
static int compiledAccessorCount()
           
static Boolean getBoolean(boolean booleanValue)
           
static boolean getBoolean(Object value)
           
static Byte getByte(byte byteValue)
           
static byte getByte(Object value)
           
static char getChar(Object value)
           
static Character getCharacter(char charValue)
           
static Double getDouble(double doubleValue)
           
static double getDouble(Object value)
           
static Float getFloat(float floatValue)
           
static float getFloat(Object value)
           
static int getInt(Object value)
           
static Integer getInteger(int intValue)
           
static Long getLong(long longValue)
           
static long getLong(Object value)
           
static short getShort(Object value)
           
static Short getShort(short shortValue)
           
static CompiledAccessor newInstance(Field field)
           
static CompiledAccessor newInstance(Method method, boolean isSetter)
           
static void setAccessThresholdToCompile(int integer)
           
static void setMaxCompiledAccessorCount(int count)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AccessThresholdToCompile

public static int AccessThresholdToCompile
Deprecated. use setAccessThresholdToCompile(int)

AccessThresholdCurrent

public static int AccessThresholdCurrent
Deprecated. use setAccessThresholdToCompile(int)

VerboseEnabled

public static boolean VerboseEnabled
Constructor Detail

CompiledAccessorFactory

public CompiledAccessorFactory()
Method Detail

setAccessThresholdToCompile

public static void setAccessThresholdToCompile(int integer)

_setAccessThresholdToCompile

public static void _setAccessThresholdToCompile(int integer)

setMaxCompiledAccessorCount

public static void setMaxCompiledAccessorCount(int count)

compiledAccessorCount

public static int compiledAccessorCount()

newInstance

public static CompiledAccessor newInstance(Field field)

newInstance

public static CompiledAccessor newInstance(Method method,
                                           boolean isSetter)

getInteger

public static Integer getInteger(int intValue)

getByte

public static Byte getByte(byte byteValue)

getCharacter

public static Character getCharacter(char charValue)

getDouble

public static Double getDouble(double doubleValue)

getFloat

public static Float getFloat(float floatValue)

getLong

public static Long getLong(long longValue)

getBoolean

public static Boolean getBoolean(boolean booleanValue)

getShort

public static Short getShort(short shortValue)

getBoolean

public static boolean getBoolean(Object value)

getByte

public static byte getByte(Object value)

getChar

public static char getChar(Object value)

getShort

public static short getShort(Object value)

getInt

public static int getInt(Object value)

getLong

public static long getLong(Object value)

getFloat

public static float getFloat(Object value)

getDouble

public static double getDouble(Object value)


AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.