Enum Download
- java.lang.Object
-
- java.lang.Enum<Download>
-
- com.dslplatform.compiler.client.parameters.Download
-
- All Implemented Interfaces:
CompileParameter,java.io.Serializable,java.lang.Comparable<Download>
public enum Download extends java.lang.Enum<Download> implements CompileParameter
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringDEFAULT_REMOTE_URL
-
Constructor Summary
Constructors Modifier Constructor Description privateDownload()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheck(Context context)static booleancheckJars(Context context, java.lang.String name, java.lang.String zip, java.lang.String id, java.lang.String path, java.lang.String... libraries)static longdownloadAndUnpack(Context context, java.lang.String file, java.io.File path)private static booleandownloadLibrary(Context context, java.lang.String name, java.lang.String path, java.io.File dependencies, Either<java.lang.String> tryMaven, java.lang.String library, java.lang.String zip)static booleandownloadZip(java.io.File dependencies, Context context, java.lang.String name, java.lang.String zip)java.lang.StringgetAlias()java.lang.StringgetDetailedDescription()java.lang.StringgetShortDescription()java.lang.StringgetUsage()static booleanisDefaultUrl(Context context)static Either<java.lang.Long>lastModified(Context context, java.lang.String file, java.lang.String name, long current)private static booleanpromptForAlternative(java.io.File dependencies, Context context, java.lang.String name, java.lang.String zip)static java.lang.StringremoteUrl(Context context)voidrun(Context context)static DownloadvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Download[]values()Returns an array containing the constants of this enum type, in the order they are declared.private static java.lang.StringwebsiteName(Context context)
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Download INSTANCE
-
-
Field Detail
-
DEFAULT_REMOTE_URL
private static final java.lang.String DEFAULT_REMOTE_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static Download[] 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 (Download c : Download.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Download valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getAlias
public java.lang.String getAlias()
- Specified by:
getAliasin interfaceCompileParameter
-
getUsage
public java.lang.String getUsage()
- Specified by:
getUsagein interfaceCompileParameter
-
remoteUrl
public static java.lang.String remoteUrl(Context context)
-
isDefaultUrl
public static boolean isDefaultUrl(Context context)
-
websiteName
private static java.lang.String websiteName(Context context)
-
downloadAndUnpack
public static long downloadAndUnpack(Context context, java.lang.String file, java.io.File path) throws java.io.IOException
- Throws:
java.io.IOException
-
lastModified
public static Either<java.lang.Long> lastModified(Context context, java.lang.String file, java.lang.String name, long current)
-
downloadZip
public static boolean downloadZip(java.io.File dependencies, Context context, java.lang.String name, java.lang.String zip)
-
promptForAlternative
private static boolean promptForAlternative(java.io.File dependencies, Context context, java.lang.String name, java.lang.String zip) throws ExitException- Throws:
ExitException
-
checkJars
public static boolean checkJars(Context context, java.lang.String name, java.lang.String zip, java.lang.String id, java.lang.String path, java.lang.String... libraries) throws ExitException
- Throws:
ExitException
-
downloadLibrary
private static boolean downloadLibrary(Context context, java.lang.String name, java.lang.String path, java.io.File dependencies, Either<java.lang.String> tryMaven, java.lang.String library, java.lang.String zip) throws ExitException
- Throws:
ExitException
-
check
public boolean check(Context context)
- Specified by:
checkin interfaceCompileParameter
-
run
public void run(Context context)
- Specified by:
runin interfaceCompileParameter
-
getShortDescription
public java.lang.String getShortDescription()
- Specified by:
getShortDescriptionin interfaceCompileParameter
-
getDetailedDescription
public java.lang.String getDetailedDescription()
- Specified by:
getDetailedDescriptionin interfaceCompileParameter
-
-