ariba.util.fieldvalue
Class CompiledAccessorFactory

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

public class CompiledAccessorFactory
extends java.lang.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 java.lang.Boolean getBoolean(boolean booleanValue)
           
static boolean getBoolean(java.lang.Object value)
           
static java.lang.Byte getByte(byte byteValue)
           
static byte getByte(java.lang.Object value)
           
static char getChar(java.lang.Object value)
           
static java.lang.Character getCharacter(char charValue)
           
static java.lang.Double getDouble(double doubleValue)
           
static double getDouble(java.lang.Object value)
           
static java.lang.Float getFloat(float floatValue)
           
static float getFloat(java.lang.Object value)
           
static int getInt(java.lang.Object value)
           
static java.lang.Integer getInteger(int intValue)
           
static java.lang.Long getLong(long longValue)
           
static long getLong(java.lang.Object value)
           
static short getShort(java.lang.Object value)
           
static java.lang.Short getShort(short shortValue)
           
static CompiledAccessor newInstance(java.lang.reflect.Field field)
           
static CompiledAccessor newInstance(java.lang.reflect.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(java.lang.reflect.Field field)

newInstance

public static CompiledAccessor newInstance(java.lang.reflect.Method method,
                                           boolean isSetter)

getInteger

public static java.lang.Integer getInteger(int intValue)

getByte

public static java.lang.Byte getByte(byte byteValue)

getCharacter

public static java.lang.Character getCharacter(char charValue)

getDouble

public static java.lang.Double getDouble(double doubleValue)

getFloat

public static java.lang.Float getFloat(float floatValue)

getLong

public static java.lang.Long getLong(long longValue)

getBoolean

public static java.lang.Boolean getBoolean(boolean booleanValue)

getShort

public static java.lang.Short getShort(short shortValue)

getBoolean

public static boolean getBoolean(java.lang.Object value)

getByte

public static byte getByte(java.lang.Object value)

getChar

public static char getChar(java.lang.Object value)

getShort

public static short getShort(java.lang.Object value)

getInt

public static int getInt(java.lang.Object value)

getLong

public static long getLong(java.lang.Object value)

getFloat

public static float getFloat(java.lang.Object value)

getDouble

public static double getDouble(java.lang.Object value)


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