Companion public val annotated with @JvmFIeld or const

This commit is contained in:
Michael Bogdanov
2015-12-25 18:08:06 +03:00
parent e116cc3206
commit e671d05105
28 changed files with 112 additions and 25 deletions
@@ -76,6 +76,7 @@ public class GenerationState @JvmOverloads constructor(
public abstract fun shouldGenerateScript(script: KtScript): Boolean
companion object {
@JvmField
public val GENERATE_ALL: GenerateClassFilter = object : GenerateClassFilter() {
override fun shouldAnnotateClass(processingClassOrObject: KtClassOrObject): Boolean = true
@@ -32,8 +32,11 @@ public class TraceBasedErrorReporter(private val trace: BindingTrace) : ErrorRep
companion object {
private val LOG = Logger.getInstance(TraceBasedErrorReporter::class.java)
@JvmField
public val ABI_VERSION_ERRORS: WritableSlice<String, AbiVersionErrorData> = Slices.createCollectiveSlice()
// TODO: MutableList is a workaround for KT-5792 Covariant types in Kotlin translated to wildcard types in Java
@JvmField
public val INCOMPLETE_HIERARCHY: WritableSlice<ClassDescriptor, MutableList<String>> = Slices.createCollectiveSlice()
}
@@ -38,7 +38,7 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension {
for (JvmDeclarationOrigin origin : data.getSignatureOrigins()) {
DeclarationDescriptor descriptor = origin.getDescriptor();
if (descriptor != null) {
renderedDescriptors.add(DescriptorRenderer.Companion.getCOMPACT().render(descriptor));
renderedDescriptors.add(DescriptorRenderer.COMPACT.render(descriptor));
}
}
Collections.sort(renderedDescriptors);
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.descriptors.annotations.Annotations
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.psi.KtProperty
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
import org.jetbrains.kotlin.resolve.source.toSourceElement
class SyntheticFieldDescriptor private constructor(
@@ -40,6 +39,7 @@ class SyntheticFieldDescriptor private constructor(
fun getDispatchReceiverForBackend() = propertyDescriptor.dispatchReceiverParameter?.value
companion object {
@JvmField
val NAME = Name.identifier("field")
}
}
@@ -54,6 +54,7 @@ public object Renderers {
private val LOG = Logger.getInstance(javaClass<Renderers>())
@JvmField
public val TO_STRING: Renderer<Any> = Renderer {
element ->
if (element is DeclarationDescriptor) {
@@ -64,16 +65,20 @@ public object Renderers {
element.toString()
}
@JvmField
public val STRING: Renderer<String> = Renderer { it }
@JvmField
public val THROWABLE: Renderer<Throwable> = Renderer {
val writer = StringWriter()
it.printStackTrace(PrintWriter(writer))
StringUtil.first(writer.toString(), 2048, true)
}
@JvmField
public val NAME: Renderer<Named> = Renderer { it.getName().asString() }
@JvmField
public val NAME_OF_PARENT_OR_FILE: Renderer<DeclarationDescriptor> = Renderer {
if (DescriptorUtils.isTopLevelDeclaration(it) && it is DeclarationDescriptorWithVisibility && it.visibility == Visibilities.PRIVATE) {
"file"
@@ -83,21 +88,26 @@ public object Renderers {
}
}
@JvmField
public val ELEMENT_TEXT: Renderer<PsiElement> = Renderer { it.getText() }
@JvmField
public val DECLARATION_NAME: Renderer<KtNamedDeclaration> = Renderer { it.getNameAsSafeName().asString() }
@JvmField
public val RENDER_CLASS_OR_OBJECT: Renderer<KtClassOrObject> = Renderer {
classOrObject: KtClassOrObject ->
val name = if (classOrObject.getName() != null) " '" + classOrObject.getName() + "'" else ""
if (classOrObject is KtClass) "Class" + name else "Object" + name
}
@JvmField
public val RENDER_CLASS_OR_OBJECT_NAME: Renderer<ClassDescriptor> = Renderer { it.renderKindWithName() }
@JvmField
public val RENDER_TYPE: Renderer<KotlinType> = Renderer { DescriptorRenderer.FQ_NAMES_IN_TYPES.renderType(it) }
@JvmField
public val RENDER_POSITION_VARIANCE: Renderer<Variance> = Renderer {
variance: Variance ->
when (variance) {
@@ -107,6 +117,7 @@ public object Renderers {
}
}
@JvmField
public val AMBIGUOUS_CALLS: Renderer<Collection<ResolvedCall<*>>> = Renderer {
calls: Collection<ResolvedCall<*>> ->
calls
@@ -130,22 +141,27 @@ public object Renderers {
}.toString()
}
@JvmField
public val TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS_RENDERER: Renderer<InferenceErrorData> = Renderer {
renderConflictingSubstitutionsInferenceError(it, TabledDescriptorRenderer.create()).toString()
}
@JvmField
public val TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR_RENDERER: Renderer<InferenceErrorData> = Renderer {
renderParameterConstraintError(it, TabledDescriptorRenderer.create()).toString()
}
@JvmField
public val TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER_RENDERER: Renderer<InferenceErrorData> = Renderer {
renderNoInformationForParameterError(it, TabledDescriptorRenderer.create()).toString()
}
@JvmField
public val TYPE_INFERENCE_UPPER_BOUND_VIOLATED_RENDERER: Renderer<InferenceErrorData> = Renderer {
renderUpperBoundViolatedInferenceError(it, TabledDescriptorRenderer.create()).toString()
}
@JvmField
public val TYPE_INFERENCE_CANNOT_CAPTURE_TYPES_RENDERER: Renderer<InferenceErrorData> = Renderer {
renderCannotCaptureTypeParameterError(it, TabledDescriptorRenderer.create()).toString()
}
@@ -341,6 +357,7 @@ public object Renderers {
return result
}
@JvmField
public val CLASSES_OR_SEPARATED: Renderer<Collection<ClassDescriptor>> = Renderer {
descriptors ->
StringBuilder {
@@ -360,6 +377,7 @@ public object Renderers {
private fun renderTypes(types: Collection<KotlinType>) = StringUtil.join(types, { RENDER_TYPE.render(it) }, ", ")
@JvmField
public val RENDER_COLLECTION_OF_TYPES: Renderer<Collection<KotlinType>> = Renderer { renderTypes(it) }
private fun renderConstraintSystem(constraintSystem: ConstraintSystem, renderTypeBounds: Renderer<TypeBounds>): String {
@@ -372,7 +390,10 @@ public object Renderers {
ConstraintsUtil.getDebugMessageForStatus(constraintSystem.status)
}
@JvmField
public val RENDER_CONSTRAINT_SYSTEM: Renderer<ConstraintSystem> = Renderer { renderConstraintSystem(it, RENDER_TYPE_BOUNDS) }
@JvmField
public val RENDER_CONSTRAINT_SYSTEM_SHORT: Renderer<ConstraintSystem> = Renderer { renderConstraintSystem(it, RENDER_TYPE_BOUNDS_SHORT) }
private fun renderTypeBounds(typeBounds: TypeBounds, short: Boolean): String {
@@ -390,7 +411,10 @@ public object Renderers {
"$typeVariableName ${StringUtil.join(typeBounds.bounds, renderBound, ", ")}"
}
@JvmField
public val RENDER_TYPE_BOUNDS: Renderer<TypeBounds> = Renderer { renderTypeBounds(it, short = false) }
@JvmField
public val RENDER_TYPE_BOUNDS_SHORT: Renderer<TypeBounds> = Renderer { renderTypeBounds(it, short = true) }
private fun renderDebugMessage(message: String, inferenceErrorData: InferenceErrorData) = StringBuilder {
@@ -27,6 +27,7 @@ public open class StatementFilter {
get() = null
companion object {
@JvmField
public val NONE: StatementFilter = StatementFilter()
}
}
@@ -61,13 +61,19 @@ public class CallableDescriptorCollectors<D : CallableDescriptor>(val collectors
@Suppress("UNCHECKED_CAST")
companion object {
@JvmField
public val FUNCTIONS_AND_VARIABLES: CallableDescriptorCollectors<CallableDescriptor> =
CallableDescriptorCollectors(listOf(
FUNCTIONS_COLLECTOR as CallableDescriptorCollector<CallableDescriptor>,
VARIABLES_COLLECTOR as CallableDescriptorCollector<CallableDescriptor>
))
@JvmField
public val FUNCTIONS: CallableDescriptorCollectors<CallableDescriptor> =
CallableDescriptorCollectors(listOf(FUNCTIONS_COLLECTOR as CallableDescriptorCollector<CallableDescriptor>))
@JvmField
public val VARIABLES: CallableDescriptorCollectors<VariableDescriptor> = CallableDescriptorCollectors(listOf(VARIABLES_COLLECTOR))
}
}
@@ -20,6 +20,7 @@ import java.util.HashMap
public class Services private constructor(private val map: Map<Class<*>, Any>) {
companion object {
@JvmField
public val EMPTY: Services = Builder().build()
}
@@ -25,9 +25,9 @@ public class KotlinJavascriptMetadata(public val abiVersion: Int, public val mod
}
public object KotlinJavascriptMetadataUtils {
public val JS_EXT: String = ".js"
public val META_JS_SUFFIX: String = ".meta.js"
public val VFS_PROTOCOL: String = "kotlin-js-meta"
public const val JS_EXT: String = ".js"
public const val META_JS_SUFFIX: String = ".meta.js"
public const val VFS_PROTOCOL: String = "kotlin-js-meta"
private val KOTLIN_JAVASCRIPT_METHOD_NAME = "kotlin_module_metadata"
private val KOTLIN_JAVASCRIPT_METHOD_NAME_PATTERN = "\\.kotlin_module_metadata\\(".toPattern()
/**
@@ -35,7 +35,7 @@ public object KotlinJavascriptMetadataUtils {
*/
private val METADATA_PATTERN = "(?m)\\w+\\.$KOTLIN_JAVASCRIPT_METHOD_NAME\\((\\d+),\\s*(['\"])([^'\"]*)\\2,\\s*(['\"])([^'\"]*)\\4\\)".toPattern()
@JvmStatic
@JvmField
public val ABI_VERSION: Int = 3
public fun replaceSuffix(filePath: String): String = filePath.substringBeforeLast(JS_EXT) + META_JS_SUFFIX
@@ -29,8 +29,10 @@ public class ModuleMapping private constructor(val packageFqName2Parts: Map<Stri
}
companion object {
@JvmField
public val MAPPING_FILE_EXT: String = "kotlin_module"
@JvmField
public val EMPTY: ModuleMapping = ModuleMapping(emptyMap())
fun create(proto: ByteArray? = null): ModuleMapping {
@@ -61,6 +61,6 @@ public class AnnotationDescriptorImpl implements AnnotationDescriptor {
@Override
public String toString() {
return DescriptorRenderer.Companion.getFQ_NAMES_IN_TYPES().renderAnnotation(this, null);
return DescriptorRenderer.FQ_NAMES_IN_TYPES.renderAnnotation(this, null);
}
}
@@ -59,7 +59,7 @@ public abstract class DeclarationDescriptorImpl extends AnnotatedImpl implements
@NotNull
public static String toString(@NotNull DeclarationDescriptor descriptor) {
try {
return DescriptorRenderer.Companion.getDEBUG_TEXT().render(descriptor) +
return DescriptorRenderer.DEBUG_TEXT.render(descriptor) +
"[" + descriptor.getClass().getSimpleName() + "@" + Integer.toHexString(System.identityHashCode(descriptor)) + "]";
} catch (Throwable e) {
// DescriptionRenderer may throw if this is not yet completely initialized
@@ -92,21 +92,25 @@ public abstract class DescriptorRenderer : Renderer<DeclarationDescriptor> {
return DescriptorRendererImpl(options)
}
@JvmField
public val COMPACT_WITH_MODIFIERS: DescriptorRenderer = withOptions {
withDefinedIn = false
}
@JvmField
public val COMPACT: DescriptorRenderer = withOptions {
withDefinedIn = false
modifiers = emptySet()
}
@JvmField
public val COMPACT_WITH_SHORT_TYPES: DescriptorRenderer = withOptions {
modifiers = emptySet()
nameShortness = NameShortness.SHORT
parameterNameRenderingPolicy = ParameterNameRenderingPolicy.ONLY_NON_SYNTHESIZED
}
@JvmField
public val ONLY_NAMES_WITH_SHORT_TYPES: DescriptorRenderer = withOptions {
withDefinedIn = false
modifiers = emptySet()
@@ -119,25 +123,30 @@ public abstract class DescriptorRenderer : Renderer<DeclarationDescriptor> {
startFromName = true
}
@JvmField
public val FQ_NAMES_IN_TYPES: DescriptorRenderer = withOptions {
modifiers = DescriptorRendererModifier.ALL
}
@JvmField
public val SHORT_NAMES_IN_TYPES: DescriptorRenderer = withOptions {
nameShortness = NameShortness.SHORT
parameterNameRenderingPolicy = ParameterNameRenderingPolicy.ONLY_NON_SYNTHESIZED
}
@JvmField
public val DEBUG_TEXT: DescriptorRenderer = withOptions {
debugMode = true
nameShortness = NameShortness.FULLY_QUALIFIED
modifiers = DescriptorRendererModifier.ALL
}
@JvmField
public val FLEXIBLE_TYPES_FOR_CODE: DescriptorRenderer = withOptions {
flexibleTypesForCode = true
}
@JvmField
public val HTML: DescriptorRenderer = withOptions {
textFormat = RenderingFormat.HTML
modifiers = DescriptorRendererModifier.ALL
@@ -240,7 +249,10 @@ public enum class DescriptorRendererModifier(val includeByDefault: Boolean) {
;
companion object {
@JvmField val DEFAULTS = DescriptorRendererModifier.values().filter { it.includeByDefault }.toSet()
@JvmField val ALL = DescriptorRendererModifier.values().toSet()
@JvmField
val DEFAULTS = DescriptorRendererModifier.values().filter { it.includeByDefault }.toSet()
@JvmField
val ALL = DescriptorRendererModifier.values().toSet()
}
}
@@ -62,7 +62,7 @@ public abstract class AbstractKotlinType implements KotlinType {
for (AnnotationWithTarget annotationWithTarget : getAnnotations().getAllAnnotations()) {
sb.append("[");
sb.append(DescriptorRenderer.Companion.getDEBUG_TEXT().renderAnnotation(
sb.append(DescriptorRenderer.DEBUG_TEXT.renderAnnotation(
annotationWithTarget.getAnnotation(), annotationWithTarget.getTarget()));
sb.append("] ");
}
@@ -25,8 +25,10 @@ import org.jetbrains.kotlin.types.isDynamic
import org.jetbrains.kotlin.types.typeUtil.builtIns
public object IdeDescriptorRenderers {
@JvmField
public val APPROXIMATE_FLEXIBLE_TYPES: (KotlinType) -> KotlinType = { approximateFlexibleTypes(it, true) }
@JvmField
public val APPROXIMATE_FLEXIBLE_TYPES_IN_ARGUMENTS: (KotlinType) -> KotlinType = { approximateFlexibleTypes(it, false) }
private fun unwrapAnonymousType(type: KotlinType): KotlinType {
@@ -53,16 +55,19 @@ public object IdeDescriptorRenderers {
modifiers = DescriptorRendererModifier.ALL
}
@JvmField
public val SOURCE_CODE: DescriptorRenderer = BASE.withOptions {
nameShortness = NameShortness.SOURCE_CODE_QUALIFIED
typeNormalizer = { APPROXIMATE_FLEXIBLE_TYPES(unwrapAnonymousType(it)) }
}
@JvmField
public val SOURCE_CODE_FOR_TYPE_ARGUMENTS: DescriptorRenderer = BASE.withOptions {
nameShortness = NameShortness.SOURCE_CODE_QUALIFIED
typeNormalizer = { APPROXIMATE_FLEXIBLE_TYPES_IN_ARGUMENTS(unwrapAnonymousType(it)) }
}
@JvmField
public val SOURCE_CODE_SHORT_NAMES_IN_TYPES: DescriptorRenderer = BASE.withOptions {
nameShortness = NameShortness.SHORT
typeNormalizer = { APPROXIMATE_FLEXIBLE_TYPES(unwrapAnonymousType(it)) }
@@ -243,7 +243,7 @@ public class SourceNavigationHelper {
MutableModuleContext newModuleContext = ContextKt.ContextForNewModule(
project, Name.special("<library module>"),
ModuleDescriptorKt.ModuleParameters(
JvmPlatform.defaultModuleParameters.getDefaultImports(),
JvmPlatform.INSTANCE.getDefaultModuleParameters().getDefaultImports(),
PlatformToKotlinClassMap.EMPTY
),
DefaultBuiltIns.getInstance()
@@ -28,6 +28,8 @@ import org.jetbrains.kotlin.resolve.jvm.diagnostics.ConflictingJvmDeclarationsDa
import org.jetbrains.kotlin.types.KotlinType
public object IdeRenderers {
@JvmField
public val HTML_AMBIGUOUS_CALLS: Renderer<Collection<ResolvedCall<*>>> = Renderer {
calls: Collection<ResolvedCall<*>> ->
calls
@@ -36,10 +38,12 @@ public object IdeRenderers {
.joinToString("") { "<li>" + DescriptorRenderer.HTML.render(it) + "</li>" }
}
@JvmField
public val HTML_RENDER_TYPE: Renderer<KotlinType> = Renderer {
DescriptorRenderer.HTML.renderType(it)
}
@JvmField
public val HTML_NONE_APPLICABLE_CALLS: Renderer<Collection<ResolvedCall<*>>> = Renderer {
calls: Collection<ResolvedCall<*>> ->
// TODO: compareBy(comparator, selector) in stdlib
@@ -49,31 +53,38 @@ public object IdeRenderers {
.joinToString("") { "<li>" + renderResolvedCall(it) + "</li>" }
}
@JvmField
public val HTML_TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS_RENDERER: Renderer<InferenceErrorData> = Renderer {
Renderers.renderConflictingSubstitutionsInferenceError(it, HtmlTabledDescriptorRenderer.create()).toString()
}
@JvmField
public val HTML_TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR_RENDERER: Renderer<InferenceErrorData> = Renderer {
Renderers.renderParameterConstraintError(it, HtmlTabledDescriptorRenderer.create()).toString()
}
@JvmField
public val HTML_TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER_RENDERER: Renderer<InferenceErrorData> = Renderer {
Renderers.renderNoInformationForParameterError(it, HtmlTabledDescriptorRenderer.create()).toString()
}
@JvmField
public val HTML_TYPE_INFERENCE_UPPER_BOUND_VIOLATED_RENDERER: Renderer<InferenceErrorData> = Renderer {
Renderers.renderUpperBoundViolatedInferenceError(it, HtmlTabledDescriptorRenderer.create()).toString()
}
@JvmField
public val HTML_RENDER_RETURN_TYPE: Renderer<CallableMemberDescriptor> = Renderer {
val returnType = it.getReturnType()!!
DescriptorRenderer.HTML.renderType(returnType)
}
@JvmField
public val HTML_COMPACT_WITH_MODIFIERS: DescriptorRenderer = DescriptorRenderer.HTML.withOptions {
withDefinedIn = false
}
@JvmField
public val HTML_CONFLICTING_JVM_DECLARATIONS_DATA: Renderer<ConflictingJvmDeclarationsData> = Renderer {
data: ConflictingJvmDeclarationsData ->
@@ -85,6 +96,7 @@ public object IdeRenderers {
"The following declarations have the same JVM signature (<code>${data.signature.name}${data.signature.desc}</code>):<br/>\n<ul>\n$conflicts</ul>"
}
@JvmField
public val HTML_THROWABLE: Renderer<Throwable> = Renderer {
Renderers.THROWABLE.render(it).replace("\n", "<br/>")
}
@@ -36,7 +36,7 @@ class TypeKindHighlightingVisitor extends AfterAnalysisHighlightingVisitor {
@Override
public void visitSimpleNameExpression(@NotNull KtSimpleNameExpression expression) {
if (NameHighlighter.namesHighlightingEnabled) {
if (NameHighlighter.INSTANCE.getNamesHighlightingEnabled()) {
DeclarationDescriptor referenceTarget = bindingContext.get(BindingContext.REFERENCE_TARGET, expression);
if (referenceTarget instanceof ConstructorDescriptor) {
referenceTarget = referenceTarget.getContainingDeclaration();
@@ -30,7 +30,10 @@ public class KotlinFileFacadeClassByPackageIndex private constructor() : StringS
companion object {
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFileFacadeClassByPackageIndex::class.java)
@JvmField
public val INSTANCE: KotlinFileFacadeClassByPackageIndex = KotlinFileFacadeClassByPackageIndex()
@JvmStatic
public fun getInstance(): KotlinFileFacadeClassByPackageIndex = INSTANCE
}
@@ -30,7 +30,10 @@ public class KotlinFileFacadeFqNameIndex private constructor() : StringStubIndex
companion object {
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFileFacadeFqNameIndex::class.java)
@JvmField
public val INSTANCE: KotlinFileFacadeFqNameIndex = KotlinFileFacadeFqNameIndex()
@JvmStatic
public fun getInstance(): KotlinFileFacadeFqNameIndex = INSTANCE
}
@@ -30,7 +30,10 @@ public class KotlinFileFacadeShortNameIndex private constructor() : StringStubIn
companion object {
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFileFacadeShortNameIndex::class.java)
@JvmField
public val INSTANCE: KotlinFileFacadeShortNameIndex = KotlinFileFacadeShortNameIndex()
@JvmStatic
public fun getInstance(): KotlinFileFacadeShortNameIndex = INSTANCE
}
@@ -31,7 +31,10 @@ public class KotlinFilePartClassIndex private constructor() : StringStubIndexExt
companion object {
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFilePartClassIndex::class.java)
@JvmField
public val INSTANCE: KotlinFilePartClassIndex = KotlinFilePartClassIndex()
@JvmStatic
public fun getInstance(): KotlinFilePartClassIndex = INSTANCE
}
@@ -31,7 +31,11 @@ public class KotlinMultifileClassPartIndex private constructor() : StringStubInd
companion object {
private val KEY = KotlinIndexUtil.createIndexKey(KotlinMultifileClassPartIndex::class.java)
@JvmField
public val INSTANCE: KotlinMultifileClassPartIndex = KotlinMultifileClassPartIndex()
public @JvmStatic fun getInstance(): KotlinMultifileClassPartIndex = INSTANCE
@JvmStatic
public fun getInstance(): KotlinMultifileClassPartIndex = INSTANCE
}
}
@@ -55,6 +55,7 @@ public class ShortenReferences(val options: (KtElement) -> Options = { Options.D
}
companion object {
@JvmField
val DEFAULT = ShortenReferences()
private fun DeclarationDescriptor.asString()
@@ -74,6 +74,7 @@ abstract class KotlinParameterInfoWithCallHandlerBase<TArgumentList : KtElement,
) : ParameterInfoHandlerWithTabActionSupport<TArgumentList, FunctionDescriptor, TArgument> {
companion object {
@JvmField
val GREEN_BACKGROUND: Color = JBColor(Color(231, 254, 234), Gray._100)
}
@@ -71,7 +71,9 @@ import java.util.*
public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
companion object {
@JvmField
public val KOTLIN_BUILDER_NAME: String = "Kotlin Builder"
public val LOOKUP_TRACKER: JpsElementChildRoleBase<JpsSimpleElement<out LookupTracker>> = JpsElementChildRoleBase.create("lookup tracker")
val LOG = Logger.getInstance("#org.jetbrains.kotlin.jps.build.KotlinBuilder")
}
@@ -17,10 +17,10 @@
package org.jetbrains.kotlin.js
object JavaScript {
val FULL_NAME = "JavaScript"
val NAME = "JS"
val LOWER_NAME = "js"
const val FULL_NAME = "JavaScript"
const val NAME = "JS"
const val LOWER_NAME = "js"
val EXTENSION = "js"
val DOT_EXTENSION = "." + EXTENSION
const val EXTENSION = "js"
const val DOT_EXTENSION = "." + EXTENSION
}
@@ -11,38 +11,38 @@ public object Charsets {
/**
* Eight-bit UCS Transformation Format.
*/
@JvmStatic
@JvmField
public val UTF_8: Charset = Charset.forName("UTF-8")
/**
* Sixteen-bit UCS Transformation Format, byte order identified by an
* optional byte-order mark.
*/
@JvmStatic
@JvmField
public val UTF_16: Charset = Charset.forName("UTF-16")
/**
* Sixteen-bit UCS Transformation Format, big-endian byte order.
*/
@JvmStatic
@JvmField
public val UTF_16BE: Charset = Charset.forName("UTF-16BE")
/**
* Sixteen-bit UCS Transformation Format, little-endian byte order.
*/
@JvmStatic
@JvmField
public val UTF_16LE: Charset = Charset.forName("UTF-16LE")
/**
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
* Unicode character set.
*/
@JvmStatic
@JvmField
public val US_ASCII: Charset = Charset.forName("US-ASCII")
/**
* ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.
*/
@JvmStatic
@JvmField
public val ISO_8859_1: Charset = Charset.forName("ISO-8859-1")
}