JET

edu.utep.cs.jet.rat.val
Class SimpleValueFactory

java.lang.Object
  extended by edu.utep.cs.jet.rat.val.SimpleValueFactory
All Implemented Interfaces:
ValueFactory

public class SimpleValueFactory
extends Object
implements ValueFactory

A concrete factory class to create various kinds of values. Each factory method defined in this class takes a Java value (or object) and returns the corresponding Denotable object; this allows to manipulate various Java values uniformly. Refer to the interface ValueFactory for various factory methods.

Version:
$Revision: 1.7 $
Author:
Yoonsik Cheon

Constructor Summary
SimpleValueFactory()
          Creates a concrete factory object.
 
Method Summary
 Denotable createArrayValue(Class<?> type, Denotable[] elems)
          Creates an array value.
 Denotable createBooleanValue(boolean val)
          Creates a boolean value.
 Denotable createByteValue(byte val)
          Creates a byte value.
 Denotable createCharValue(char val)
          Creates a char value.
 Denotable createConstructorCall(Constructor<?> con, Denotable[] args)
          Creates a constructor-call value.
 Denotable createDoubleValue(double val)
          Creates a double value.
 Denotable createFloatValue(float val)
          Creates a float value.
 Denotable createIntValue(int val)
          Creates an int value.
 Denotable createLongValue(long val)
          Creates a long value.
 Denotable createMethodCall(Class<?> type, Method meth, Denotable receiver, Denotable[] args)
          Creates a method-call value.
 Denotable createNullValue(Class<?> type)
          Creates a null value of the given type.
 Denotable createShortValue(short val)
          Creates a short value.
 Denotable createStringValue(String val)
          Creates a string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleValueFactory

public SimpleValueFactory()
Creates a concrete factory object.

Method Detail

createBooleanValue

public Denotable createBooleanValue(boolean val)
Creates a boolean value.

Specified by:
createBooleanValue in interface ValueFactory

createByteValue

public Denotable createByteValue(byte val)
Creates a byte value.

Specified by:
createByteValue in interface ValueFactory

createShortValue

public Denotable createShortValue(short val)
Creates a short value.

Specified by:
createShortValue in interface ValueFactory

createIntValue

public Denotable createIntValue(int val)
Creates an int value.

Specified by:
createIntValue in interface ValueFactory

createLongValue

public Denotable createLongValue(long val)
Creates a long value.

Specified by:
createLongValue in interface ValueFactory

createCharValue

public Denotable createCharValue(char val)
Creates a char value.

Specified by:
createCharValue in interface ValueFactory

createFloatValue

public Denotable createFloatValue(float val)
Creates a float value.

Specified by:
createFloatValue in interface ValueFactory

createDoubleValue

public Denotable createDoubleValue(double val)
Creates a double value.

Specified by:
createDoubleValue in interface ValueFactory

createStringValue

public Denotable createStringValue(String val)
Creates a string value.

Specified by:
createStringValue in interface ValueFactory

createNullValue

public Denotable createNullValue(Class<?> type)
Creates a null value of the given type.

Specified by:
createNullValue in interface ValueFactory

createArrayValue

public Denotable createArrayValue(Class<?> type,
                                  Denotable[] elems)
Creates an array value.

Specified by:
createArrayValue in interface ValueFactory

createMethodCall

public Denotable createMethodCall(Class<?> type,
                                  Method meth,
                                  Denotable receiver,
                                  Denotable[] args)
Creates a method-call value.

Specified by:
createMethodCall in interface ValueFactory

createConstructorCall

public Denotable createConstructorCall(Constructor<?> con,
                                       Denotable[] args)
Creates a constructor-call value.

Specified by:
createConstructorCall in interface ValueFactory

JET

JET is Copyright (C) 2005-2008 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.