Package eu.bandm.tools.metajava
Class GeneratedLiteral<T>
java.lang.Object
eu.bandm.tools.metajava.GeneratedLiteral<T>
- All Implemented Interfaces:
Formattable
-
Constructor Summary
ModifierConstructorDescriptionprotected
GeneratedLiteral
(Class<? extends T> cls, String name) protected
GeneratedLiteral
(T value, Format display) protected
GeneratedLiteral
(T value, String display) -
Method Summary
Modifier and TypeMethodDescriptionstatic Format
array
(MetaType type, Formattable... values) static Format
array
(MetaType type, List<? extends Formattable> values) final Format
format()
Returns a pretty-printable representation of this object.final T
getValue()
static GeneratedLiteral<Boolean>
literal
(boolean value) static GeneratedLiteral<Character>
literal
(char value) static GeneratedLiteral<Double>
literal
(double value) static GeneratedLiteral<Float>
literal
(float value) static GeneratedLiteral<Integer>
literal
(int value) static GeneratedLiteral<Long>
literal
(long value) static GeneratedLiteral<String>
static GeneratedLiteral<GeneratedAnnotation>
static <A extends Formattable>
GeneratedLiteral<A[]>static <T> GeneratedLiteral<T>
static String
quote
(boolean b) static String
quote
(char c) static String
quote
(double d) static String
quote
(float f) static String
quote
(int i) static String
quote
(long l) static String
protected static Format
selectFormat
(Class<?> cls, String name) protected static <T> T
selectValue
(Class<T> cls, String name) toString()
-
Constructor Details
-
GeneratedLiteral
-
GeneratedLiteral
-
GeneratedLiteral
-
-
Method Details
-
getValue
-
format
Description copied from interface:Formattable
Returns a pretty-printable representation of this object.- Specified by:
format
in interfaceFormattable
- Returns:
- a format that represents this object in a pretty-printable way
-
toString
-
selectValue
-
selectFormat
-
literal
-
literal
-
literal
-
literal
-
literal
-
literal
-
literal
-
literalNull
-
literal
-
quote
-
quote
-
quote
-
quote
-
quote
-
quote
-
quote
-
array
-
array
-
literal
-