org.crsh.cmdline
Class SimpleValueType<T>

java.lang.Object
  extended by org.crsh.cmdline.SimpleValueType<T>

public abstract class SimpleValueType<T>
extends Object

Version:
$Revision$
Author:
Julien Viet

Field Summary
static SimpleValueType<Boolean> BOOLEAN
          .
private  Class<? extends Completer> completer
          .
static SimpleValueType<Enum> ENUM
          .
static SimpleValueType<Integer> INTEGER
          .
private  Class<T> javaType
          .
static SimpleValueType<String> STRING
          .
private static SimpleValueType<?>[] types
          .
static SimpleValueType<Value> VALUE
          .
 
Constructor Summary
private SimpleValueType(Class<T> javaType, Class<? extends Completer> completer)
           
 
Method Summary
static SimpleValueType<?> get(Class<?> clazz)
           
 Class<? extends Completer> getCompleter()
           
 Class<T> getJavaType()
           
 int getRelativeDegree(Class<?> clazz)
           
abstract
<S extends T>
T
parse(Class<S> type, String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING

public static final SimpleValueType<String> STRING
.


INTEGER

public static final SimpleValueType<Integer> INTEGER
.


BOOLEAN

public static final SimpleValueType<Boolean> BOOLEAN
.


ENUM

public static final SimpleValueType<Enum> ENUM
.


VALUE

public static final SimpleValueType<Value> VALUE
.


types

private static final SimpleValueType<?>[] types
.


javaType

private final Class<T> javaType
.


completer

private final Class<? extends Completer> completer
.

Constructor Detail

SimpleValueType

private SimpleValueType(Class<T> javaType,
                        Class<? extends Completer> completer)
Method Detail

get

public static SimpleValueType<?> get(Class<?> clazz)

getRelativeDegree

public int getRelativeDegree(Class<?> clazz)

getCompleter

public Class<? extends Completer> getCompleter()

getJavaType

public Class<T> getJavaType()

parse

public abstract <S extends T> T parse(Class<S> type,
                                      String s)
                 throws Exception
Throws:
Exception


Copyright © 2012 eXo Platform SAS. All Rights Reserved.