org.apache.myfaces.buildtools.maven2.plugin.builder.utils
Class MyfacesUtils
java.lang.Object
org.apache.myfaces.buildtools.maven2.plugin.builder.utils.MyfacesUtils
public class MyfacesUtils
- extends Object
Collection of useful utility methods.
An instance of this type is made available to the templates used to generate
output files, so that they can call these useful methods.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESERVED_WORDS
public static final Set RESERVED_WORDS
PRIMITIVE_TYPES
public static final Set PRIMITIVE_TYPES
MyfacesUtils
public MyfacesUtils()
getPrefixedPropertyName
public static String getPrefixedPropertyName(String prefix,
String propertyName)
getTagName
public static String getTagName(String prefixedName)
- Convert h:commandButton to commandButton
- Parameters:
prefixedName
-
- Returns:
getTagPrefix
public static String getTagPrefix(String prefixedName)
getJspPropertyType11
public static String getJspPropertyType11(PropertyMeta property)
getFullJspPropertyType11
public static String getFullJspPropertyType11(PropertyMeta property)
getJspPropertyType12
public static String getJspPropertyType12(PropertyMeta property)
getVariableFromName
public static String getVariableFromName(String name)
importTagClasses
public static String importTagClasses(PropertyHolder component)
importTagClasses12
public static String importTagClasses12(ComponentMeta component)
isConverter
public static boolean isConverter(String propClass)
isList
public static boolean isList(String propClass)
castIfNecessary
public static String castIfNecessary(String propClass)
getBoxedClass
public static String getBoxedClass(String className)
getSignatureParams
public static String getSignatureParams(MethodSignatureMeta signature)
isStringMethodBindingReturnType
public static boolean isStringMethodBindingReturnType(MethodSignatureMeta sig)
getMethodReaderFromProperty
public static String getMethodReaderFromProperty(String propertyName,
String propertyClass)
getPrimitiveType
public static String getPrimitiveType(String className)
isPrimitiveClass
public static boolean isPrimitiveClass(String className)
convertClassToSourcePath
public static String convertClassToSourcePath(String className,
String fileExtension)
isFullClass
public static boolean isFullClass(String className)
getClassFromFullClass
public static String getClassFromFullClass(String fullClass)
- Extract the simple class name from a fully-qualified classname.
Given a string like "org.apache.Foo", this method returns "Foo".
getPackageFromFullClass
public static String getPackageFromFullClass(String fullClass)
getConstantNameFromProperty
public static String getConstantNameFromProperty(String propertyName)
getConstantNameFromProperty
public static String getConstantNameFromProperty(String propertyName,
String constantSuffix)
getPropertyClass
public static String getPropertyClass(PropertyMeta property)
getMethodNameFromEvent
public static String getMethodNameFromEvent(String methodPrefix,
String eventName,
String methodSuffix)
getEventNameFromEventType
public static String getEventNameFromEventType(String eventFullClass)
primitiveDefaultValue
public static String primitiveDefaultValue(String className)
fill
public static String fill(String base,
int length)
getVariableFromClass
public static String getVariableFromClass(String className)
convertStringToLiteral
public static String convertStringToLiteral(String value)
convertStringToLiteral
public static String convertStringToLiteral(String className,
String value)
getDefaultValue
public static String getDefaultValue(PropertyMeta property)
getDefaultValueField
public static String getDefaultValueField(PropertyMeta property)
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.