Class seriesClass = Class.forName( (String) htSeriesNames.get( sSeriesName ) ); Method createMethod = seriesClass.getDeclaredMethod( "create", new Class[]{} ); Series series = (Series) createMethod.invoke( seriesClass, new Object[]{} ); setIgnoreNotifications( true ); series.translateFrom( oldSeries, iSeriesDefinitionIndex, getChart( ) ); setIgnoreNotifications( false );
ChartCacheManager.getInstance( ) .cacheSeries( iSeriesDefinitionIndex, oldSeries );  Series series = ChartCacheManager.getInstance( ) .findSeries( (String) htSeriesNames.get( sSeriesName ), iSeriesDefinitionIndex ); if ( series == null ) { Class seriesClass = Class.forName( (String) htSeriesNames.get( sSeriesName ) ); Method createMethod = seriesClass.getDeclaredMethod( "create", new Class[]{} ); final Series newSeries = (Series) createMethod.invoke( seriesClass, new Object[]{} ); ChartAdapter.changeChartWithoutNotification( new IChangeWithoutNotification( ) {  public Object run( ) { ChartUIUtil.copyGeneralSeriesAttributes( oldSeries, newSeries );    return null; } } ); series = newSeries; }
		private Series getNewSeries( String sSeriesName, Series oldSeries )		{			try			{				Class seriesClass = Class.forName( (String) htSeriesNames.get( sSeriesName ) );				Method createMethod = seriesClass.getDeclaredMethod( "create", new Class[]{} ); //$NON-NLS-1$				Series series = (Series) createMethod.invoke( seriesClass,						new Object[]{} );				setIgnoreNotifications( true );				series.translateFrom( oldSeries,						iSeriesDefinitionIndex,						getChart( ) );				setIgnoreNotifications( false );				return series;			}			catch ( Exception e )			{				e.printStackTrace( );			}			return null;		}