Class AbstractLanguage
java.lang.Object
io.spring.initializr.generator.language.AbstractLanguage
- All Implemented Interfaces:
Language
- Direct Known Subclasses:
GroovyLanguage
,JavaLanguage
,KotlinLanguage
Base
Language
implementation.- Author:
- Stephane Nicoll
-
Field Summary
Fields inherited from interface io.spring.initializr.generator.language.Language
DEFAULT_JVM_VERSION
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractLanguage
(String id, String jvmVersion, String sourceFileExtension) Creates a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.spring.initializr.generator.language.Language
isKeyword, supportsEscapingKeywordsInPackage
-
Constructor Details
-
AbstractLanguage
Creates a new instance.- Parameters:
id
- the idjvmVersion
- the JVM versionsourceFileExtension
- the source file extension
-
-
Method Details
-
id
Description copied from interface:Language
Return the language identifier. -
jvmVersion
Description copied from interface:Language
Return the JVM version level to use.- Specified by:
jvmVersion
in interfaceLanguage
- Returns:
- the JVM version or "1.8" if not set
-
sourceFileExtension
Description copied from interface:Language
Return the file extension to use for source file of this language.- Specified by:
sourceFileExtension
in interfaceLanguage
- Returns:
- the source file extension
-
toString
-