< prev index next >

modules/javafx.fxml/src/main/java/javafx/fxml/FXMLLoader.java

Print this page
rev 10441 : imported patch fix-8177566-trampoline
rev 10444 : imported patch doc-8177566-trampoline

@@ -81,10 +81,11 @@
 import com.sun.javafx.fxml.expression.Expression;
 import com.sun.javafx.fxml.expression.ExpressionValue;
 import com.sun.javafx.fxml.expression.KeyPath;
 import static com.sun.javafx.FXPermissions.MODIFY_FXML_CLASS_LOADER_PERMISSION;
 import com.sun.javafx.fxml.FXMLLoaderHelper;
+import com.sun.javafx.fxml.MethodHelper;
 import java.net.MalformedURLException;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.EnumMap;
 import java.util.Locale;

@@ -93,10 +94,14 @@
 import sun.reflect.misc.MethodUtil;
 import sun.reflect.misc.ReflectUtil;
 
 /**
  * Loads an object hierarchy from an XML document.
+ * For more information, see the
+ * <a href="doc-files/introduction_to_fxml.html">Introduction to FXML</a>
+ * document.
+ *
  * @since JavaFX 2.0
  */
 public class FXMLLoader {
 
     // Indicates permission to get the ClassLoader

@@ -993,11 +998,11 @@
                 } catch (NoSuchMethodException exception) {
                     throw constructLoadException(exception);
                 }
 
                 try {
-                    value = MethodUtil.invoke(factoryMethod, null, new Object [] {});
+                    value = MethodHelper.invoke(factoryMethod, null, new Object [] {});
                 } catch (IllegalAccessException exception) {
                     throw constructLoadException(exception);
                 } catch (InvocationTargetException exception) {
                     throw constructLoadException(exception);
                 }

@@ -1772,13 +1777,13 @@
         }
 
         public void invoke(Object... params) {
             try {
                 if (type != SupportedType.PARAMETERLESS) {
-                    MethodUtil.invoke(method, controller, params);
+                    MethodHelper.invoke(method, controller, params);
                 } else {
-                    MethodUtil.invoke(method, controller, new Object[] {});
+                    MethodHelper.invoke(method, controller, new Object[] {});
                 }
             } catch (InvocationTargetException exception) {
                 throw new RuntimeException(exception);
             } catch (IllegalAccessException exception) {
                 throw new RuntimeException(exception);

@@ -2581,14 +2586,13 @@
                                                   .get(SupportedType.PARAMETERLESS)
                                                   .get(INITIALIZE_METHOD_NAME);
 
                     if (initializeMethod != null) {
                         try {
-                            MethodUtil.invoke(initializeMethod, controller, new Object [] {});
+                            MethodHelper.invoke(initializeMethod, controller, new Object [] {});
                         } catch (IllegalAccessException exception) {
-                            // TODO Throw when Initializable is deprecated/removed
-                            // throw constructLoadException(exception);
+                            throw constructLoadException(exception);
                         } catch (InvocationTargetException exception) {
                             throw constructLoadException(exception);
                         }
                     }
                 }
< prev index next >