org.crsh.cli.type
Class ValueType<V>
java.lang.Object
org.crsh.cli.type.ValueType<V>
- Type Parameters:
V
- the generic value type
- Direct Known Subclasses:
- PathValueType
-
public abstract class ValueType<V>
- extends Object
-
A type for values.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
STRING
public static final ValueType<String> STRING
-
.
INTEGER
public static final ValueType<Integer> INTEGER
-
.
BOOLEAN
public static final ValueType<Boolean> BOOLEAN
-
.
ENUM
public static final ValueType<Enum> ENUM
-
.
PROPERTIES
public static final ValueType<Properties> PROPERTIES
-
.
OBJECT_NAME
public static final ValueType<ObjectName> OBJECT_NAME
-
.
THREAD
public static final ValueType<Thread> THREAD
-
.
type
protected final Class<V> type
-
.
completer
protected final Class<? extends Completer> completer
-
.
ValueType
protected ValueType(Class<V> type,
Class<? extends Completer> completer)
throws NullPointerException
-
- Throws:
NullPointerException
ValueType
protected ValueType(Class<V> type)
throws NullPointerException
-
- Throws:
NullPointerException
getDistance
final int getDistance(Class<?> clazz)
-
hashCode
public final int hashCode()
-
- Overrides:
hashCode
in class Object
-
equals
public final boolean equals(Object obj)
-
- Overrides:
equals
in class Object
-
getCompleter
public Class<? extends Completer> getCompleter()
-
getType
public final Class<V> getType()
-
parse
public final V parse(String s)
throws Exception
-
- Throws:
Exception
parse
public abstract <S extends V> S parse(Class<S> type,
String s)
throws Exception
-
- Throws:
Exception
Copyright © 2014 eXo Platform SAS. All Rights Reserved.