RichFaces CDK Generator 4.2.0.CR1

org.richfaces.cdk.util
Class JavaUtils

java.lang.Object
  extended by org.richfaces.cdk.util.JavaUtils

public final class JavaUtils
extends Object

Author:
Nick Belaevski

Field Summary
static com.google.common.collect.ImmutableMap<Class<?>,Class<?>> BOXING_CLASSES
           
static com.google.common.base.Function<Class<?>,String> CLASS_TO_CLASS_NAME
           
 
Method Summary
static void copyProperties(Object source, Object destination)
           
static String getEscapedString(String s)
          

Escapes string into Java language expression

static String getEscapedStringsArray(Iterable<String> strings)
          

Escapes sequence of strings into comma-separated sequence of Java language expressions

static boolean isalnum(char c)
          Returns true if the char isalpha() or isdigit().
static boolean isalpha(char c)
          Returns true if the char isupper() or islower().
static boolean isdigit(char c)
          Returns true if the char is from '0' to '9' inclusive.
static boolean islower(char c)
          Returns true if the char is from 'a' to 'z' inclusive.
static boolean isupper(char c)
          Returns true if the char is from 'A' to 'Z' inclusive.
static Class<?> toBoxingClass(Class<?> targetType)
           
static void writeProperty(Object source, Object destination, PropertyDescriptor targetProperty, PropertyDescriptor sourceProperty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOXING_CLASSES

public static final com.google.common.collect.ImmutableMap<Class<?>,Class<?>> BOXING_CLASSES

CLASS_TO_CLASS_NAME

public static final com.google.common.base.Function<Class<?>,String> CLASS_TO_CLASS_NAME
Method Detail

getEscapedString

public static String getEscapedString(String s)

Escapes string into Java language expression

Parameters:
s -
Returns:

getEscapedStringsArray

public static String getEscapedStringsArray(Iterable<String> strings)

Escapes sequence of strings into comma-separated sequence of Java language expressions

Parameters:
strings -
Returns:

isalnum

public static boolean isalnum(char c)
Returns true if the char isalpha() or isdigit().


isalpha

public static boolean isalpha(char c)
Returns true if the char isupper() or islower().


isupper

public static boolean isupper(char c)
Returns true if the char is from 'A' to 'Z' inclusive.


islower

public static boolean islower(char c)
Returns true if the char is from 'a' to 'z' inclusive.


isdigit

public static boolean isdigit(char c)
Returns true if the char is from '0' to '9' inclusive.


toBoxingClass

public static Class<?> toBoxingClass(Class<?> targetType)

copyProperties

public static void copyProperties(Object source,
                                  Object destination)
                           throws CdkException
Throws:
CdkException

writeProperty

public static void writeProperty(Object source,
                                 Object destination,
                                 PropertyDescriptor targetProperty,
                                 PropertyDescriptor sourceProperty)
                          throws IllegalAccessException,
                                 InvocationTargetException
Throws:
IllegalAccessException
InvocationTargetException

RichFaces CDK Generator 4.2.0.CR1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.