Enum ImportPolicy

    • Enum Constant Detail

      • IMPORT_TOP_LEVEL

        public static final ImportPolicy IMPORT_TOP_LEVEL
        Import the outermost class and explicitly qualify references below that. For example, to reference com.google.Foo.Bar, we import com.google.Foo and explicitly qualify Foo.Bar.
      • IMPORT_CLASS_DIRECTLY

        public static final ImportPolicy IMPORT_CLASS_DIRECTLY
        Import nested classes directly, and qualify static references from the class level.
      • STATIC_IMPORT_ALWAYS

        public static final ImportPolicy STATIC_IMPORT_ALWAYS
        When inlining static methods, always static import the method. Non-static references to classes are imported from the top level as in IMPORT_TOP_LEVEL.
    • Method Detail

      • values

        public static ImportPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ImportPolicy c : ImportPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ImportPolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • bind

        public static void bind​(com.sun.tools.javac.util.Context context,
                                ImportPolicy policy)
      • instance

        public static ImportPolicy instance​(com.sun.tools.javac.util.Context context)
      • classReference

        public abstract com.sun.tools.javac.tree.JCTree.JCExpression classReference​(Inliner inliner,
                                                                                    CharSequence topLevelClazz,
                                                                                    CharSequence fullyQualifiedClazz)