public class JUtils extends Object
| Constructor and Description |
|---|
JUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
camelCase(String name)
Format a prefixed name as camelCase.
|
static String |
camelCase(String prefix,
String name)
Format a prefixed name as camelCase.
|
static String |
enumConst(PEnumValue value) |
static long |
generateSerialVersionUID(PMessageDescriptor<?,?> type) |
static String |
getClassName(PDeclaredDescriptor<?> type) |
static String |
getClassName(PService service) |
static String |
getHazelcastClassId(PMessageDescriptor<?,?> type)
Method to get the message constant for the thrift struct.
|
static String |
getHazelcastClassId(String name)
Method to get the message constant for the thrift struct.
|
static String |
getHazelcastFactory(PMessageDescriptor<?,?> type)
Method to get the thrift file as a class name for a hazelcast factory.
|
static String |
getJavaPackage(CProgram document) |
static String |
getPackageClassPath(String javaPackage) |
static String |
macroCase(String name)
Format a prefixed name as MACRO_CASE.
|
public static long generateSerialVersionUID(@Nonnull PMessageDescriptor<?,?> type)
public static String getClassName(@Nonnull PDeclaredDescriptor<?> type)
public static String getJavaPackage(@Nonnull CProgram document) throws GeneratorException
GeneratorExceptionpublic static String getPackageClassPath(@Nonnull String javaPackage) throws GeneratorException
GeneratorExceptionpublic static String getHazelcastFactory(@Nonnull PMessageDescriptor<?,?> type)
type - PStructDescriptor with the information to fetch thrift info from.public static String getHazelcastClassId(PMessageDescriptor<?,?> type)
type - PStructDescriptor with the information to fetch message info from.public static String getHazelcastClassId(String name)
name - String with the class name to create format from.public static String camelCase(String name)
name - The name to camel-case.public static String camelCase(String prefix, String name)
prefix - Name prefix, not modified.name - The name to camel-case.public static String macroCase(String name)
name - The name to macro-case.public static String enumConst(PEnumValue value)
Copyright © 2015–2018 morimekta.net. All rights reserved.