public interface ModuleInfoItem
These are the individual items that compose the
ModuleInfoDescriptor builder.
Note that generally speaking the majority of use cases can use methods from ModuleInfoDescriptor
instead of needing to use anything provided here.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Stringcontents()Provides the content of the description item appropriate to write out.booleanexports()Returns true if this is using aexportsdefinition.booleanReturns true if this is using astaticdefinition.booleanReturns true if this is using atransitivedefinition.default ModuleInfoItemmergeCreate(ModuleInfoItem another) Provides the ability to create a new merged descriptor item using this as the basis, and then combining another into it in order to create a new descriptor item.booleanopens()Returns true if this is using aopendefinition.ordering()Applicable if the target is referencing a list of target class or package names.The comments that proceed the item definition.booleanprovides()Returns true if this is using aprovidesdefinition.booleanrequires()Returns true if this is arequiresdefinition.target()The target class name, package name, or module name this item applies to.booleanuses()Returns true if this is ausesdefinition.withOrTo()Anywithortodefinitions.If there is anyordering()establish requiring a sort then a new sorted set will be returned.
-
Method Details
-
precomments
The comments that proceed the item definition.- Returns:
- pre-comments
-
target
String target()The target class name, package name, or module name this item applies to.- Returns:
- target
-
requires
boolean requires()Returns true if this is arequiresdefinition.- Returns:
- true if this item is using requires
-
uses
boolean uses()Returns true if this is ausesdefinition.- Returns:
- true if this item is using requires
-
isTransitiveUsed
boolean isTransitiveUsed()Returns true if this is using atransitivedefinition.- Returns:
- true if this item is using transitive
-
isStaticUsed
boolean isStaticUsed()Returns true if this is using astaticdefinition.- Returns:
- true if this item is using static
-
exports
boolean exports()Returns true if this is using aexportsdefinition.- Returns:
- true if this item is using exports
-
opens
boolean opens()Returns true if this is using aopendefinition.- Returns:
- true if this item is using opens
-
provides
boolean provides()Returns true if this is using aprovidesdefinition.- Returns:
- true if this item is using provides
-
ordering
Optional<ModuleInfoDescriptor.Ordering> ordering()Applicable if the target is referencing a list of target class or package names.- Returns:
- ordering
-
withOrTo
Anywithortodefinitions.- Returns:
- the set of with or to definitions
-
withOrToSorted
If there is anyordering()establish requiring a sort then a new sorted set will be returned.- Returns:
- optionally the sorted set, else it is the same as
withOrTo()
-
contents
Provides the content of the description item appropriate to write out.- Returns:
- the contents (source code body) for this descriptor item
-
mergeCreate
Provides the ability to create a new merged descriptor item using this as the basis, and then combining another into it in order to create a new descriptor item.- Parameters:
another- the other descriptor item to merge- Returns:
- the merged descriptor
-