-
-
Save Riduidel/419889 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void removeJavaFXMethods(Set<Method> methods) { | |
try { | |
// Never load twice a Java class, it's really an heavy code fragment, requiring class path and file parsing, and so on | |
Class fxObject = Class.forName("com.sun.javafx.runtime.FXObject"); | |
if (fxObject.isAssignableFrom(moduleClass)) { | |
Iterator<Method> iterator = methods.iterator(); | |
while (iterator.hasNext()) { | |
Method m = iterator.next(); | |
if (m.getDeclaringClass().equals(fxObject)) | |
// Will only work if input set allows remove operation, which seems in no way guaranteed to me. It would be better to re-create set with correct methods | |
iterator.remove(); | |
} | |
} | |
} catch (ClassNotFoundException cnfe) { | |
// this code surely isn't JavaFX code | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment