public final class TypesFactoryImpl extends Object implements TypesFactory
BOOLEAN_TYPE, DOUBLE_TYPE, INT_TYPE, INTEGER_TYPE, OBJECT_TYPE, STRING_TYPE, VOID_TYPE| Constructor and Description |
|---|
TypesFactoryImpl(Logger log,
CdkClassLoader classLoader,
TypeParserFactory typeParserFactory) |
| Modifier and Type | Method and Description |
|---|---|
ELType |
getGeneratedType(String typeString,
ELType superType) |
ELType |
getMatchingVisibleMethodReturnType(ELType elType,
String methodName,
ELType... parameterTypes)
Find an accessible method that matches the given name and has compatible parameters.
|
ELPropertyDescriptor |
getPropertyDescriptor(ELType elType,
String propertyName)
This method return PropertyDescriptor by specified propertyName and clazz.
|
ELType |
getType(String typeString)
|
ELType |
getType(Type reflectionType)
|
@Inject public TypesFactoryImpl(Logger log, CdkClassLoader classLoader, TypeParserFactory typeParserFactory)
public ELType getType(String typeString)
TypesFactory
getType in interface TypesFactorypublic ELType getGeneratedType(String typeString, ELType superType)
getGeneratedType in interface TypesFactorypublic ELType getType(Type reflectionType)
TypesFactory
getType in interface TypesFactorypublic ELPropertyDescriptor getPropertyDescriptor(ELType elType, String propertyName) throws ParsingException
getPropertyDescriptor in interface TypesFactoryelType - - class to searchpropertyName - - propertyName to searchParsingException - if error occured.public ELType getMatchingVisibleMethodReturnType(ELType elType, 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.
getMatchingVisibleMethodReturnType in interface TypesFactoryelType - find method in this classmethodName - find method with this nameparameterTypes - find method with compatible parametersParsingException - if error occured.Copyright © 2014 JBoss by Red Hat. All Rights Reserved.