public class ExpressionPartHelper {
public static ExpressionPart getExpressionPartForMethod( PackageDataModelOracle sce,
String factName,
String methodName ) {
MethodInfo mi = sce.getMethodInfo( factName, methodName );
if ( DataType.TYPE_COLLECTION.equals( mi.getGenericType() ) ) {
return new ExpressionCollection( methodName, mi.getReturnClassType(),
mi.getGenericType(), mi.getParametricReturnType() );
}
return new ExpressionMethod( mi.getName(), mi.getReturnClassType(), mi.getGenericType() );
}