org.richfaces.cdk.templatecompiler.el.types
Interface TypesFactory

All Known Implementing Classes:
TypesFactoryImpl

public interface TypesFactory

Author:
Nick Belaevski

Field Summary
static ELType BOOLEAN_TYPE
           
static ELType DOUBLE_TYPE
           
static ELType INT_TYPE
           
static ELType INTEGER_TYPE
           
static ELType OBJECT_TYPE
           
static ELType STRING_TYPE
           
static ELType VOID_TYPE
           
 
Method Summary
 ELType getMatchingVisibleMethodReturnType(ELType elType, java.lang.String methodName, ELType... parameterTypes)
           Find an accessible method that matches the given name and has compatible parameters.
 ELPropertyDescriptor getPropertyDescriptor(ELType type, java.lang.String name)
          This method return PropertyDescriptor by specified propertyName and clazz.
 ELType getType(java.lang.String typeString)
          

 ELType getType(java.lang.reflect.Type reflectionType)
          

 

Field Detail

OBJECT_TYPE

static final ELType OBJECT_TYPE

STRING_TYPE

static final ELType STRING_TYPE

BOOLEAN_TYPE

static final ELType BOOLEAN_TYPE

DOUBLE_TYPE

static final ELType DOUBLE_TYPE

INTEGER_TYPE

static final ELType INTEGER_TYPE

INT_TYPE

static final ELType INT_TYPE

VOID_TYPE

static final ELType VOID_TYPE
Method Detail

getType

ELType getType(java.lang.String typeString)

Parameters:
typeString -
Returns:

getType

ELType getType(java.lang.reflect.Type reflectionType)

Parameters:
reflectionType -
Returns:

getMatchingVisibleMethodReturnType

ELType getMatchingVisibleMethodReturnType(ELType elType,
                                          java.lang.String methodName,
                                          ELType... parameterTypes)
                                          throws ParsingException

Find an accessible method that matches the given name and has compatible parameters. Compatible parameters mean that every method parameter is assignable from the given parameters. In other words, it finds a method with the given name that will take the parameters given.

This method is slightly undeterminstic since it loops through methods names and return the first matching method.

This method is used by #invokeMethod(Object object,String methodName,Object [] args,Class[] parameterTypes).

This method can match primitive parameter by passing in wrapper classes. For example, a Boolean will match a primitive boolean parameter.

Parameters:
elType - find method in this class
methodName - find method with this name
parameterTypes - find method with compatible parameters
Returns:
The accessible method
Throws:
ParsingException - if error occured.

getPropertyDescriptor

ELPropertyDescriptor getPropertyDescriptor(ELType type,
                                           java.lang.String name)
                                           throws ParsingException
This method return PropertyDescriptor by specified propertyName and clazz.

Parameters:
elType - - class to search
propertyName - - propertyName to search
Returns:
property descriptor if found.
Throws:
ParsingException - if error occured.


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