org.richfaces.cdk.util
Class JavaUtils

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

public final class JavaUtils
extends java.lang.Object

Author:
Nick Belaevski

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

Escapes string into Java language expression

static java.lang.String getEscapedStringsArray(java.lang.Iterable<java.lang.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 java.lang.Class<?> toBoxingClass(java.lang.Class<?> targetType)
           
static void writeProperty(java.lang.Object source, java.lang.Object destination, java.beans.PropertyDescriptor targetProperty, java.beans.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<java.lang.Class<?>,java.lang.Class<?>> BOXING_CLASSES

CLASS_TO_CLASS_NAME

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

getEscapedString

public static java.lang.String getEscapedString(java.lang.String s)

Escapes string into Java language expression

Parameters:
s -
Returns:

getEscapedStringsArray

public static java.lang.String getEscapedStringsArray(java.lang.Iterable<java.lang.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 java.lang.Class<?> toBoxingClass(java.lang.Class<?> targetType)

copyProperties

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

writeProperty

public static void writeProperty(java.lang.Object source,
                                 java.lang.Object destination,
                                 java.beans.PropertyDescriptor targetProperty,
                                 java.beans.PropertyDescriptor sourceProperty)
                          throws java.lang.IllegalAccessException,
                                 java.lang.reflect.InvocationTargetException
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.