| Modifier and Type | Method and Description |
|---|---|
static Name |
append(ModelFactory factory,
Name... names)
Concatenates each name and returns it.
|
static Name |
append(ModelFactory factory,
Name prefix,
String rest)
Returns a new name which is concatenated the prefix name with the suffix name string.
|
static void |
emit(Model model,
PrintWriter writer)
Emits Java DOM object into the target writer.
|
static ModelFactory |
getModelFactory()
Returns a basic Java DOM factory.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
boolean[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
byte[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
char[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
double[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
float[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
int[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
long[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
short[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
String[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ArrayInitializer |
toArrayInitializer(ModelFactory factory,
Type[] array)
Returns an array initializer which contains the original elements as related Java expression.
|
static ClassLiteral |
toClassLiteral(ModelFactory factory,
Type type)
Returns a type literal of the target type.
|
static List<SimpleName> |
toList(Name name)
Returns a simple name list of the target name.
|
static Literal |
toLiteral(ModelFactory factory,
boolean value)
Returns a Java literal of the target value.
|
static Expression |
toLiteral(ModelFactory factory,
byte value)
Returns a Java literal (with cast operation) of the target value.
|
static Literal |
toLiteral(ModelFactory factory,
char value)
Returns a Java literal of the target value.
|
static Literal |
toLiteral(ModelFactory factory,
double value)
Returns a Java literal of the target value.
|
static Literal |
toLiteral(ModelFactory factory,
float value)
Returns a Java literal of the target value.
|
static Literal |
toLiteral(ModelFactory factory,
int value)
Returns a Java literal of the target value.
|
static Literal |
toLiteral(ModelFactory factory,
long value)
Returns a Java literal of the target value.
|
static Expression |
toLiteral(ModelFactory factory,
Object value)
Returns a Java literal of the target value.
|
static Expression |
toLiteral(ModelFactory factory,
short value)
Returns a Java literal (with cast operation) of the target value.
|
static Literal |
toLiteral(ModelFactory factory,
String value)
Returns a Java literal of the target value.
|
static Name |
toName(ModelFactory factory,
Enum<?> constant)
Returns the fully qualified name of the target enum constant.
|
static Name |
toName(ModelFactory factory,
String nameString)
Returns a name from the name string.
|
static Literal |
toNullLiteral(ModelFactory factory)
Returns a
null literal. |
static Type |
toType(ModelFactory factory,
Type type)
Returns a Java DOM object from the Java reflective object.
|
public static ModelFactory getModelFactory()
public static List<SimpleName> toList(Name name)
name - the target nameIllegalArgumentException - if the parameter is nullpublic static Name append(ModelFactory factory, Name prefix, String rest)
factory - the Java DOM factoryprefix - the prefix namerest - the suffix name string (may be a qualified name string)IllegalArgumentException - if the parameters are nullpublic static Name append(ModelFactory factory, Name... names)
factory - the Java DOM factorynames - the names to be concatenatedIllegalArgumentException - if the names are empty, or the parameters are nullpublic static void emit(Model model, PrintWriter writer)
CommentEmitTrait,
their comments will be also emitted into the writer.model - the target DOM objectwriter - the target writerIllegalArgumentException - if the parameters are nullpublic static Type toType(ModelFactory factory, Type type)
factory - the Java DOM factorytype - the target reflective objectIllegalArgumentException - if the parameters are nullpublic static Name toName(ModelFactory factory, String nameString)
factory - the Java DOM factorynameString - the target name stringIllegalArgumentException - if the parameters are nullpublic static Name toName(ModelFactory factory, Enum<?> constant)
factory - the Java DOM factoryconstant - the target enum constantIllegalArgumentException - if the parameters are nullpublic static Expression toLiteral(ModelFactory factory, byte value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameters are nullpublic static Expression toLiteral(ModelFactory factory, short value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameter is nullpublic static Literal toLiteral(ModelFactory factory, int value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameter is nullpublic static Literal toLiteral(ModelFactory factory, long value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameter is nullpublic static Literal toLiteral(ModelFactory factory, float value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameter is nullpublic static Literal toLiteral(ModelFactory factory, double value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameter is nullpublic static Literal toLiteral(ModelFactory factory, boolean value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameter is nullpublic static Literal toLiteral(ModelFactory factory, char value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameter is nullpublic static Literal toLiteral(ModelFactory factory, String value)
factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the parameters are nullpublic static Expression toLiteral(ModelFactory factory, Object value)
java.lang.String java.lang.reflect.Type null factory - the Java DOM factoryvalue - the target valueIllegalArgumentException - if the value is something wrong, or the parameters are nullpublic static ClassLiteral toClassLiteral(ModelFactory factory, Type type)
factory - the Java DOM factorytype - the target Java typeIllegalArgumentException - if the parameters are nullpublic static Literal toNullLiteral(ModelFactory factory)
null literal.factory - the Java DOM factoryIllegalArgumentException - if the parameter is nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, int[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, float[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, long[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, double[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, char[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, boolean[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, byte[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, short[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, String[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullpublic static ArrayInitializer toArrayInitializer(ModelFactory factory, Type[] array)
factory - the Java DOM factoryarray - the target arrayIllegalArgumentException - if the parameters are nullCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.