< prev index next >
modules/javafx.fxml/src/main/java/javafx/fxml/FXML.java
Print this page
rev 10359 : 8170701: Update FXML documentation for setAccessible
Reviewed-by:
*** 1,7 ****
/*
! * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 27,39 ****
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
! * Annotation that tags a class or member as accessible to markup.
* @since JavaFX 2.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface FXML {
--- 27,56 ----
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+ import java.lang.module.ModuleDescriptor;
+ import java.lang.reflect.Module;
/**
! * Annotation that tags a field or method as accessible to markup.
! * If the object being annotated is in a named module then it must
! * be reflectively accessible to the {@code javafx.fxml} module.
! * An object is reflectively accessible if the module containing that
! * object {@link Module#isOpen opens} the containing package to the
! * {@code javafx.fxml} module, either in its {@link ModuleDescriptor}
! * (module-info.class) or by calling {@link Module#addOpens}.
! * An object is also reflectively accessible if it is declared as public,
! * is in a public class, and the module containing that class
! * {@link Module#isExported(String,Module) exports}
! * the containing package to the {@code javafx.fxml} module.
! * If the object is not reflectively accessible to the {@code javafx.fxml}
! * module, then the {@link FXMLLoader} will fail with an
! * {@code InaccessibleObjectException} when it attempts to modify the
! * annotated element.
! *
* @since JavaFX 2.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface FXML {
< prev index next >