Enum NodePackageManager
-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum NodePackageManager extends Enum<NodePackageManager>
An enum of all supported Node package managers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classNodePackageManager.Companion
-
Field Summary
Fields Modifier and Type Field Description private final StringlockfileNameprivate final StringmarkerFileNameprivate final StringworkspaceFileNameprivate final Stringnameprivate final Integerordinalprivate final EnumEntries<NodePackageManager>entries
-
Method Summary
Modifier and Type Method Description BooleanhasLockfile(File projectDir)Return true if the projectDir contains a lockfile for this package manager, or return false otherwise. List<String>getWorkspaces(File projectDir)If the projectDir contains a workspace file for this package manager, return the list of package patterns, or return null otherwise. final IntegergetFileScore(File projectDir)Return a score for the projectDir based on the presence of files specific to this package manager. final NodePackageManagervalueOf(String value)Returns the enum constant of this type with the specified name. final Array<NodePackageManager>values()Returns an array containing the constants of this enum type, in the order they're declared. final StringgetLockfileName()final StringgetMarkerFileName()final StringgetWorkspaceFileName()final EnumEntries<NodePackageManager>getEntries()An enum of all supported Node package managers. -
-
Method Detail
-
hasLockfile
Boolean hasLockfile(File projectDir)
Return true if the projectDir contains a lockfile for this package manager, or return false otherwise.
-
getWorkspaces
List<String> getWorkspaces(File projectDir)
If the projectDir contains a workspace file for this package manager, return the list of package patterns, or return null otherwise.
-
getFileScore
final Integer getFileScore(File projectDir)
Return a score for the projectDir based on the presence of files specific to this package manager. The higher the score, the more likely it is that the projectDir is managed by this package manager.
-
valueOf
final NodePackageManager valueOf(String value)
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.)
-
values
final Array<NodePackageManager> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getLockfileName
final String getLockfileName()
-
getMarkerFileName
final String getMarkerFileName()
-
getWorkspaceFileName
final String getWorkspaceFileName()
-
getEntries
final EnumEntries<NodePackageManager> getEntries()
An enum of all supported Node package managers.
-
-
-
-