Interface Feature<T extends Feature<T>>
- All Known Implementing Classes:
GuavaLibrary, JavaxPackage, Jsr305, SourceLevel
public interface Feature<T extends Feature<T>>
A feature encapsulates the availability of a type or source level feature that can be used in
the source written to a
SourceBuilder, such as Java language-level features, or Guava
types and methods.
A feature will typically provide a FeatureType constant that can be passed to
SourceBuilder#feature(FeatureType) to determine the current status of a feature.
For instance, to determine whether java.util.Objects is available for use:
code.feature(SOURCE_LEVEL)..isPresent()invalid reference
javaUtilObjects()