System.out.println("mapping of Display.setCurrent() for " + files.length + " class files.");
	public void postCompile(File classesDir, Device device)	throws BuildException 	{		boolean enableScreenEffects = this.environment.hasSymbol("polish.css.screen-change-animation");		if (!enableScreenEffects) {			return;		}		String[] fileNames = FileUtil.filterDirectory( classesDir, ".class", true );		ArrayList filesList = new ArrayList( fileNames.length );		for (int i = 0; i < fileNames.length; i++) {			String fileName = fileNames[i];			if (!(fileName.endsWith("StyleSheet.class") 					|| fileName.endsWith("MasterCanvas.class")					|| fileName.endsWith("ScreenChangeAnimation.class") 					|| (fileName.indexOf("screenanimations") != -1) )) 			{				filesList.add( new File( classesDir, fileName ) );			//} else {			//	System.out.println("ScreenChanger: skipping class " + fileName);			}		}		File[] files = (File[]) filesList.toArray( new File[ filesList.size() ] );		try {			System.out.println("mapping of Display.setCurrent() for " + files.length + " class files.");			String targetClassName;			if (this.environment.hasSymbol("polish.useDefaultPackage")) {				targetClassName = "StyleSheet";			} else {				targetClassName = "de/enough/polish/ui/StyleSheet";			}			MethodMapper mapper = new MethodMapper();			mapper.setClassLoader(device.getClassLoader());						// Note: This code is duplicated in MasterCanvasPostCompiler.			mapper.addMapping(				new MethodInvocationMapping(true, "javax/microedition/lcdui/Display", "setCurrent",											"(Ljavax/microedition/lcdui/Displayable;)V",											false, targetClassName, "setCurrent",											"(Ljavax/microedition/lcdui/Display;Ljavax/microedition/lcdui/Displayable;)V")			);						mapper.doMethodMapping( files );		} catch (IOException e) {			e.printStackTrace();			throw new BuildException("Unable to map Display.setCurrent( Displayable ) to StyleSheet.setCurrent( Display, Displayable ): " + e.toString(), e );		}	}