List methods; if ( handle instanceof DataSetHandle ) { methods = DesignEngine.getMetaDataDictionary( ) .getElement( ReportDesignConstants.DATA_SET_ELEMENT ) .getMethods( ); } else if ( handle instanceof DataSourceHandle ) { methods = DesignEngine.getMetaDataDictionary( ) .getElement( ReportDesignConstants.DATA_SOURCE_ELEMENT ) .getMethods( ); } else { methods = handle.getDefn( ).getLocalMethods( ); }
List methods = handle.getDefn( ).getMethods( );
	public static Map getDesignElementMethodArguments(			DesignElementHandle handle, String methodName )	{		List methods;		if ( handle instanceof DataSetHandle )		{			methods = DesignEngine.getMetaDataDictionary( )					.getElement( ReportDesignConstants.DATA_SET_ELEMENT ) //$NON-NLS-1$					.getMethods( );		}		else if ( handle instanceof DataSourceHandle )		{			methods = DesignEngine.getMetaDataDictionary( )					.getElement( ReportDesignConstants.DATA_SOURCE_ELEMENT ) //$NON-NLS-1$					.getMethods( );		}		else		{			methods = handle.getDefn( ).getLocalMethods( );		}		Map argMap = new LinkedHashMap( methods.size( ) * 2 );		for ( Iterator iter = methods.iterator( ); iter.hasNext( ); )		{			IMethodInfo method = ( (ElementPropertyDefn) iter.next( ) ).getMethodInfo( );			if ( method.getName( ).equals( methodName ) )			{				Iterator argumentListIterator = method.argumentListIterator( );				if ( argumentListIterator.hasNext( ) )				{					IArgumentInfoList argumentInfoList = (IArgumentInfoList) argumentListIterator.next( );					int i = 0;					for ( Iterator iterator = argumentInfoList.argumentsIterator( ); iterator.hasNext( ); i++ )					{						IArgumentInfo arg = (IArgumentInfo) iterator.next( );						argMap.put( arg.getName( ), arg.getType( ) );					}				}			}		}		return argMap;	}