Class Selector<T>

    • Constructor Detail

      • Selector

        protected Selector()
        Deprecated.
    • Method Detail

      • get

        public abstract T get()
        Deprecated.
        Get the currently relevant object, or null if there is none.
        Returns:
        the currently relevant object
      • nullSelector

        public static <T> Selector<T> nullSelector()
        Deprecated.
        Get the null selector. This selector always returns null.
        Type Parameters:
        T - the selectable class' type
        Returns:
        the null selector
      • selectorFor

        public static <T> Selector<T> selectorFor​(java.lang.Class<T> clazz)
        Deprecated.
        Get the selector for a given class. Never returns null. If there is a selector set, the caller must have the get SelectorPermission for the class.
        Type Parameters:
        T - the class type
        Parameters:
        clazz - the class
        Returns:
        the selector for the given type (not null)
      • setSelectorFor

        public static <T> void setSelectorFor​(java.lang.Class<T> clazz,
                                              Selector<T> selector)
        Deprecated.
        Set the selector for a given class. If there is no selector set, the caller must have the set SelectorPermission for that class. If there is one set, the caller must have the change SelectorPermission. If there is a selector set, and it is identical to the proposed selector, this method returns without taking any action.
        Type Parameters:
        T - the class type
        Parameters:
        clazz - the class
        selector - the selector to set for the class
      • selectorGetterFor

        public static <T> Selector.Getter<T> selectorGetterFor​(java.lang.Class<T> clazz)
        Deprecated.
        Get an efficient, unchecked selector getter for a given class. The caller must have the get SelectorPermission for the class.
        Type Parameters:
        T - the class type
        Parameters:
        clazz - the class
        Returns:
        the unchecked selector getter
      • selectorGetterActionFor

        public static <T> java.security.PrivilegedAction<Selector.Getter<T>> selectorGetterActionFor​(java.lang.Class<T> clazz)
        Deprecated.
        Get a privileged action which returns the getter for a selector.
        Type Parameters:
        T - the class type
        Parameters:
        clazz - the class
        Returns:
        the getter privileged action
      • getGetPermissionFor

        public static SelectorPermission getGetPermissionFor​(java.lang.Class<?> clazz)
        Deprecated.
        Get the get permission for the given class. The permission is cached.
        Parameters:
        clazz - the class to get the permission for
        Returns:
        the selector permission for the class
      • getSetPermissionFor

        public static SelectorPermission getSetPermissionFor​(java.lang.Class<?> clazz)
        Deprecated.
        Get the set permission for the given class. The permission is cached.
        Parameters:
        clazz - the class to get the permission for
        Returns:
        the selector permission for the class
      • getChangePermissionFor

        public static SelectorPermission getChangePermissionFor​(java.lang.Class<?> clazz)
        Deprecated.
        Get the change permission for the given class. The permission is cached.
        Parameters:
        clazz - the class to get the permission for
        Returns:
        the selector permission for the class