public class JavaSyntax extends AbstractSyntax
Constructor and Description |
---|
JavaSyntax()
Instantiates a new java syntax.
|
Modifier and Type | Method and Description |
---|---|
StringBuilder |
_class(StringBuilder sb,
String className,
String genericBounds,
Class<?> superClass,
String superClassParams,
String superClassEnclosingClassParams,
String... interfaces)
_class.
|
String |
$class(String className,
String genericBounds,
Class<?> superClass,
String superClassParameterisation,
String superClassEnclosingClassParams,
String... implementedInterfaces)
$class.
|
static String |
callMethod(String methodName)
Call method.
|
static String |
callMethod(String owner,
String methodName)
Call method.
|
static String |
callMethod(String owner,
String methodName,
Object... paramterStrings)
Call method.
|
static String |
instantiate(Class<?> type,
String value)
Instantiate.
|
static String |
quote(String s)
Quote.
|
_blockEnd, _blockStart, _else, _if, _modifier, _quote, $blockEnd, $blockStart, $else, $if, $modifier, $quote, getAssignOperator, getQuote
public static String instantiate(Class<?> type, String value)
type
- the typevalue
- the valuepublic StringBuilder _class(StringBuilder sb, String className, String genericBounds, Class<?> superClass, String superClassParams, String superClassEnclosingClassParams, String... interfaces)
sb
- the sbclassName
- the class namegenericBounds
- the generic boundssuperClass
- the super classsuperClassParams
- the super class paramssuperClassEnclosingClassParams
- the super class enclosing class paramsinterfaces
- the interfacespublic String $class(String className, String genericBounds, Class<?> superClass, String superClassParameterisation, String superClassEnclosingClassParams, String... implementedInterfaces)
className
- the class namegenericBounds
- the generic boundssuperClass
- the super classsuperClassParameterisation
- the super class parameterisationsuperClassEnclosingClassParams
- the super class enclosing class paramsimplementedInterfaces
- the implemented interfacespublic static String callMethod(String methodName)
methodName
- the method namepublic static String callMethod(String owner, String methodName)
owner
- the ownermethodName
- the method nameCopyright © 2003–2021 XDEV Software. All rights reserved.