Package com.google.inject.internal
Enum Class BytecodeGen.Visibility
- All Implemented Interfaces:
Serializable
,Comparable<BytecodeGen.Visibility>
,Constable
- Enclosing class:
- BytecodeGen
The required visibility of a user's class from a Guice-generated class. Visibility of
package-private members depends on the loading classloader: only if two classes were loaded by
the same classloader can they see each other's package-private members. We need to be careful
when choosing which classloader to use for generated classes. We prefer our bridge classloader,
since it's OSGi-safe and doesn't leak permgen space. But often we cannot due to visibility.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that Guice-generated classes only need to call and override public members of the target class.Indicates that Guice-generated classes need to call or override package-private members. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract BytecodeGen.Visibility
and
(BytecodeGen.Visibility that) static BytecodeGen.Visibility
static BytecodeGen.Visibility
static BytecodeGen.Visibility
Returns the enum constant of this class with the specified name.static BytecodeGen.Visibility[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PUBLIC
Indicates that Guice-generated classes only need to call and override public members of the target class. These generated classes may be loaded by our bridge classloader. -
SAME_PACKAGE
Indicates that Guice-generated classes need to call or override package-private members. These generated classes must be loaded in the same classloader as the target class. They won't work with OSGi, and won't get garbage collected until the target class' classloader is garbage collected.
-
-
Constructor Details
-
Visibility
private Visibility()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
forMember
-
forType
-
and
-