Deprecated 'INSTANCE$' replaced with 'INSTANCE'

This commit is contained in:
Michael Bogdanov
2015-12-24 10:36:13 +03:00
parent 80fd9e3cbb
commit aeb6486473
98 changed files with 187 additions and 187 deletions
@@ -265,7 +265,7 @@ public class ClosureCodegen extends MemberCodegen<KtElement> {
}
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -480,7 +480,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
markLineNumber(expression, isStatement);
v.mark(end);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -1294,7 +1294,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
}
}
v.invokevirtual("java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -1433,7 +1433,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
JvmMethodSignature constructor = typeMapper.mapSignature(SamCodegenUtil.resolveSamAdapter(constructorDescriptor));
v.invokespecial(type.getInternalName(), "<init>", constructor.getAsmMethod().getDescriptor(), false);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -1551,7 +1551,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
for (Function<StackValue, Void> task : Lists.reverse(leaveTasks)) {
task.fun(value);
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -2789,7 +2789,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
putJavaLangClassInstance(v, classAsmType);
wrapJavaClassIntoKClass(v);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -3248,7 +3248,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
}
value.store(StackValue.onStack(storeType), v, true);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -3373,7 +3373,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
CallableMethod method = typeMapper.mapToCallableMethod(constructor, false);
invokeMethodWithArguments(method, resolvedCall, StackValue.none());
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -3389,7 +3389,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
public Unit invoke(InstructionAdapter v) {
gen(sizeExpression, Type.INT_TYPE);
newArrayInstruction(arrayType);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -3628,7 +3628,7 @@ The "returned" value of try expression with no finally is either the last expres
if (finallyBlock != null) {
blockStackElements.pop();
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -3692,7 +3692,7 @@ The "returned" value of try expression with no finally is either the last expres
}
generateCheckCastInstruction(rightType, opToken == KtTokens.AS_SAFE);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -3808,7 +3808,7 @@ The "returned" value of try expression with no finally is either the last expres
SwitchCodegenUtil.buildAppropriateSwitchCodegenIfPossible(expression, isStatement, ExpressionCodegen.this);
if (switchCodegen != null) {
switchCodegen.generate();
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
int subjectLocal = expr != null ? myFrameMap.enterTemp(subjectType) : -1;
@@ -40,7 +40,7 @@ public class JvmRuntimeTypes {
public JvmRuntimeTypes() {
ModuleDescriptorImpl module = TargetPlatformKt.createModule(
JvmPlatform.INSTANCE$,
JvmPlatform.INSTANCE,
Name.special("<jvm functions impl>"),
LockBasedStorageManager.NO_LOCKS
);
@@ -135,7 +135,7 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
@Override
public Unit invoke(String message) {
messageSeverityCollector.report(CompilerMessageSeverity.ERROR, message, CompilerMessageLocation.NO_LOCATION);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
})) {
return COMPILATION_ERROR;
@@ -175,7 +175,7 @@ public class CompileEnvironmentUtil {
}
}
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -161,9 +161,9 @@ public enum TopDownAnalyzerFacadeForJVM {
@NotNull
public static MutableModuleContext createContextWithSealedModule(@NotNull Project project, @NotNull String moduleName) {
MutableModuleContext context = ContextKt.ContextForNewModule(
project, Name.special("<" + moduleName + ">"), JvmPlatform.INSTANCE$
project, Name.special("<" + moduleName + ">"), JvmPlatform.INSTANCE
);
context.setDependencies(context.getModule(), JvmPlatform.INSTANCE$.getBuiltIns().getBuiltInsModule());
context.setDependencies(context.getModule(), JvmPlatform.INSTANCE.getBuiltIns().getBuiltInsModule());
return context;
}
}
@@ -986,7 +986,7 @@ public class ControlFlowInformationProvider {
@Override
public Unit invoke(Instruction instruction, D enterData, D exitData) {
execute(instruction, enterData, exitData);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
public abstract void execute(Instruction instruction, D enterData, D exitData);
@@ -996,7 +996,7 @@ public class ControlFlowInformationProvider {
@Override
public Unit invoke(P p) {
execute(p);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
public abstract void execute(P p);
@@ -271,7 +271,7 @@ public class ControlFlowProcessor {
@NotNull
private AccessTarget getResolvedCallAccessTarget(KtElement element) {
ResolvedCall<?> resolvedCall = CallUtilKt.getResolvedCall(element, trace.getBindingContext());
return resolvedCall != null ? new AccessTarget.Call(resolvedCall) : AccessTarget.BlackBox.INSTANCE$;
return resolvedCall != null ? new AccessTarget.Call(resolvedCall) : AccessTarget.BlackBox.INSTANCE;
}
@NotNull
@@ -279,7 +279,7 @@ public class ControlFlowProcessor {
DeclarationDescriptor descriptor = trace.get(BindingContext.DECLARATION_TO_DESCRIPTOR, element);
return descriptor instanceof VariableDescriptor
? new AccessTarget.Declaration((VariableDescriptor) descriptor)
: AccessTarget.BlackBox.INSTANCE$;
: AccessTarget.BlackBox.INSTANCE;
}
@Override
@@ -465,7 +465,7 @@ public class ControlFlowProcessor {
}
Map<PseudoValue, ReceiverValue> receiverValues = SmartFMap.emptyMap();
AccessTarget accessTarget = AccessTarget.BlackBox.INSTANCE$;
AccessTarget accessTarget = AccessTarget.BlackBox.INSTANCE;
if (left instanceof KtSimpleNameExpression || left instanceof KtQualifiedExpression) {
accessTarget = getResolvedCallAccessTarget(KtPsiUtilKt.getQualifiedElementSelector(left));
if (accessTarget instanceof AccessTarget.Call) {
@@ -476,7 +476,7 @@ public class ControlFlowProcessor {
accessTarget = getDeclarationAccessTarget(left);
}
if (accessTarget == AccessTarget.BlackBox.INSTANCE$ && !(left instanceof KtProperty)) {
if (accessTarget == AccessTarget.BlackBox.INSTANCE && !(left instanceof KtProperty)) {
generateInstructions(left);
createSyntheticValue(left, MagicKind.VALUE_CONSUMER, left);
}
@@ -519,7 +519,7 @@ public class ControlFlowInstructionsGenerator extends ControlFlowBuilderAdapter
@Nullable ResolvedCall<?> resolvedCall,
@NotNull Map<PseudoValue, ReceiverValue> receiverValues
) {
AccessTarget accessTarget = resolvedCall != null ? new AccessTarget.Call(resolvedCall) : AccessTarget.BlackBox.INSTANCE$;
AccessTarget accessTarget = resolvedCall != null ? new AccessTarget.Call(resolvedCall) : AccessTarget.BlackBox.INSTANCE;
ReadValueInstruction instruction = new ReadValueInstruction(
expression, getCurrentScope(), accessTarget, receiverValues, valueFactory
);
@@ -102,7 +102,7 @@ public class DefaultErrorMessages {
options.setWithoutTypeParameters(false);
options.setReceiverAfterName(false);
options.setRenderAccessors(true);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -358,8 +358,8 @@ import static org.jetbrains.kotlin.lexer.KtTokens.*;
protected static void closeDeclarationWithCommentBinders(@NotNull PsiBuilder.Marker marker, @NotNull IElementType elementType, boolean precedingNonDocComments) {
marker.done(elementType);
marker.setCustomEdgeTokenBinders(precedingNonDocComments ? PrecedingCommentsBinder.INSTANCE$ : PrecedingDocCommentsBinder.INSTANCE$,
TrailingCommentsBinder.INSTANCE$);
marker.setCustomEdgeTokenBinders(precedingNonDocComments ? PrecedingCommentsBinder.INSTANCE : PrecedingDocCommentsBinder.INSTANCE,
TrailingCommentsBinder.INSTANCE);
}
protected abstract KotlinParsing create(SemanticWhitespaceAwarePsiBuilder builder);
@@ -217,7 +217,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
packageDirective = mark();
packageDirective.done(PACKAGE_DIRECTIVE);
// this is necessary to allow comments at the start of the file to be bound to the first declaration
packageDirective.setCustomEdgeTokenBinders(DoNotBindAnything.INSTANCE$, null);
packageDirective.setCustomEdgeTokenBinders(DoNotBindAnything.INSTANCE, null);
}
parseImportDirectives();
@@ -347,7 +347,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
}
consumeIf(SEMICOLON);
importDirective.done(IMPORT_DIRECTIVE);
importDirective.setCustomEdgeTokenBinders(null, TrailingCommentsBinder.INSTANCE$);
importDirective.setCustomEdgeTokenBinders(null, TrailingCommentsBinder.INSTANCE);
}
private boolean closeImportWithErrorIfNewline(PsiBuilder.Marker importDirective, String errorMessage) {
@@ -363,7 +363,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
PsiBuilder.Marker importList = mark();
if (!at(IMPORT_KEYWORD)) {
// this is necessary to allow comments at the start of the file to be bound to the first declaration
importList.setCustomEdgeTokenBinders(DoNotBindAnything.INSTANCE$, null);
importList.setCustomEdgeTokenBinders(DoNotBindAnything.INSTANCE, null);
}
while (at(IMPORT_KEYWORD)) {
parseImportDirective();
@@ -54,7 +54,7 @@ public class KtDotQualifiedExpression extends KtExpressionImplStub<KotlinPlaceHo
return childExpressionsByStub[0];
}
}
return KtQualifiedExpressionImpl.INSTANCE$.getReceiverExpression(this);
return KtQualifiedExpressionImpl.INSTANCE.getReceiverExpression(this);
}
@Nullable
@@ -67,7 +67,7 @@ public class KtDotQualifiedExpression extends KtExpressionImplStub<KotlinPlaceHo
return childExpressionsByStub[1];
}
}
return KtQualifiedExpressionImpl.INSTANCE$.getSelectorExpression(this);
return KtQualifiedExpressionImpl.INSTANCE.getSelectorExpression(this);
}
@@ -93,12 +93,12 @@ public class KtDotQualifiedExpression extends KtExpressionImplStub<KotlinPlaceHo
@NotNull
@Override
public ASTNode getOperationTokenNode() {
return KtQualifiedExpressionImpl.INSTANCE$.getOperationTokenNode(this);
return KtQualifiedExpressionImpl.INSTANCE.getOperationTokenNode(this);
}
@NotNull
@Override
public KtToken getOperationSign() {
return KtQualifiedExpressionImpl.INSTANCE$.getOperationSign(this);
return KtQualifiedExpressionImpl.INSTANCE.getOperationSign(this);
}
}
@@ -45,20 +45,20 @@ public class KtParameterList extends KtElementImplStub<KotlinPlaceHolderStub<KtP
@NotNull
public KtParameter addParameter(@NotNull KtParameter parameter) {
return EditCommaSeparatedListHelper.INSTANCE$.addItem(this, getParameters(), parameter);
return EditCommaSeparatedListHelper.INSTANCE.addItem(this, getParameters(), parameter);
}
@NotNull
public KtParameter addParameterAfter(@NotNull KtParameter parameter, @Nullable KtParameter anchor) {
return EditCommaSeparatedListHelper.INSTANCE$.addItemAfter(this, getParameters(), parameter, anchor);
return EditCommaSeparatedListHelper.INSTANCE.addItemAfter(this, getParameters(), parameter, anchor);
}
@NotNull
public KtParameter addParameterBefore(@NotNull KtParameter parameter, @Nullable KtParameter anchor) {
return EditCommaSeparatedListHelper.INSTANCE$.addItemBefore(this, getParameters(), parameter, anchor);
return EditCommaSeparatedListHelper.INSTANCE.addItemBefore(this, getParameters(), parameter, anchor);
}
public void removeParameter(@NotNull KtParameter parameter) {
EditCommaSeparatedListHelper.INSTANCE$.removeItem(parameter);
EditCommaSeparatedListHelper.INSTANCE.removeItem(parameter);
}
}
@@ -34,24 +34,24 @@ public class KtSafeQualifiedExpression extends KtExpressionImpl implements KtQua
@NotNull
@Override
public KtExpression getReceiverExpression() {
return KtQualifiedExpressionImpl.INSTANCE$.getReceiverExpression(this);
return KtQualifiedExpressionImpl.INSTANCE.getReceiverExpression(this);
}
@Nullable
@Override
public KtExpression getSelectorExpression() {
return KtQualifiedExpressionImpl.INSTANCE$.getSelectorExpression(this);
return KtQualifiedExpressionImpl.INSTANCE.getSelectorExpression(this);
}
@NotNull
@Override
public ASTNode getOperationTokenNode() {
return KtQualifiedExpressionImpl.INSTANCE$.getOperationTokenNode(this);
return KtQualifiedExpressionImpl.INSTANCE.getOperationTokenNode(this);
}
@NotNull
@Override
public KtToken getOperationSign() {
return KtQualifiedExpressionImpl.INSTANCE$.getOperationSign(this);
return KtQualifiedExpressionImpl.INSTANCE.getOperationSign(this);
}
}
@@ -52,21 +52,21 @@ public class KtValueArgumentList extends KtElementImpl {
@NotNull
public KtValueArgument addArgument(@NotNull KtValueArgument argument) {
return EditCommaSeparatedListHelper.INSTANCE$.addItem(this, getArguments(), argument);
return EditCommaSeparatedListHelper.INSTANCE.addItem(this, getArguments(), argument);
}
@NotNull
public KtValueArgument addArgumentAfter(@NotNull KtValueArgument argument, @Nullable KtValueArgument anchor) {
return EditCommaSeparatedListHelper.INSTANCE$.addItemAfter(this, getArguments(), argument, anchor);
return EditCommaSeparatedListHelper.INSTANCE.addItemAfter(this, getArguments(), argument, anchor);
}
@NotNull
public KtValueArgument addArgumentBefore(@NotNull KtValueArgument argument, @Nullable KtValueArgument anchor) {
return EditCommaSeparatedListHelper.INSTANCE$.addItemBefore(this, getArguments(), argument, anchor);
return EditCommaSeparatedListHelper.INSTANCE.addItemBefore(this, getArguments(), argument, anchor);
}
public void removeArgument(@NotNull KtValueArgument argument) {
assert argument.getParent() == this;
EditCommaSeparatedListHelper.INSTANCE$.removeItem(argument);
EditCommaSeparatedListHelper.INSTANCE.removeItem(argument);
}
}
@@ -545,7 +545,7 @@ public class BodyResolver {
private void processModifiersOnInitializer(@NotNull KtModifierListOwner owner, @NotNull LexicalScope scope) {
annotationChecker.check(owner, trace, null);
ModifierCheckerCore.INSTANCE$.check(owner, trace, null);
ModifierCheckerCore.INSTANCE.check(owner, trace, null);
KtModifierList modifierList = owner.getModifierList();
if (modifierList == null) return;
@@ -582,7 +582,7 @@ public class BodyResolver {
valueParameterDescriptor : unsubstitutedPrimaryConstructor.getValueParameters()) {
handler.addVariableDescriptor(valueParameterDescriptor);
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -814,7 +814,7 @@ public class BodyResolver {
@Override
public Unit invoke(LexicalScopeImpl.InitializeHandler handler) {
handler.addVariableDescriptor(fieldDescriptor);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
// Check parameter name shadowing
@@ -83,7 +83,7 @@ public class FunctionDescriptorUtil {
for (ValueParameterDescriptor valueParameterDescriptor : descriptor.getValueParameters()) {
handler.addVariableDescriptor(valueParameterDescriptor);
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -116,7 +116,7 @@ public class OverrideResolver {
if (element instanceof KtDeclaration) {
trace.report(CANNOT_INFER_VISIBILITY.on((KtDeclaration) element, descriptor));
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
};
}
@@ -171,7 +171,7 @@ public class OverrideResolver {
public boolean isEqual(D d1, D d2) {
CallableDescriptor f = transform.fun(d1);
CallableDescriptor g = transform.fun(d2);
return DescriptorEquivalenceForOverrides.INSTANCE$.areEquivalent(f.getOriginal(), g.getOriginal());
return DescriptorEquivalenceForOverrides.INSTANCE.areEquivalent(f.getOriginal(), g.getOriginal());
}
});
@@ -218,10 +218,10 @@ public class OverrideResolver {
// when B is defined in modules m1 and m2, and C (indirectly) inherits from both versions,
// we'll be getting sets of members that do not override each other, but are structurally equivalent.
// As other code relies on no equal descriptors passed here, we guard against f == g, but this may not be necessary
if (!f.equals(g) && DescriptorEquivalenceForOverrides.INSTANCE$.areEquivalent(f.getOriginal(), g.getOriginal())) return true;
if (!f.equals(g) && DescriptorEquivalenceForOverrides.INSTANCE.areEquivalent(f.getOriginal(), g.getOriginal())) return true;
CallableDescriptor originalG = g.getOriginal();
for (D overriddenFunction : DescriptorUtils.getAllOverriddenDescriptors(f)) {
if (DescriptorEquivalenceForOverrides.INSTANCE$.areEquivalent(originalG, overriddenFunction.getOriginal())) return true;
if (DescriptorEquivalenceForOverrides.INSTANCE.areEquivalent(originalG, overriddenFunction.getOriginal())) return true;
}
return false;
}
@@ -287,7 +287,7 @@ public class CallResolver {
return resolveFunctionCall(
BasicCallResolutionContext.create(
trace, scope, call, expectedType, dataFlowInfo, ContextDependency.INDEPENDENT, CheckArgumentTypesMode.CHECK_VALUE_ARGUMENTS,
CallChecker.DoNothing.INSTANCE$, isAnnotationContext
CallChecker.DoNothing.INSTANCE, isAnnotationContext
)
);
}
@@ -721,7 +721,7 @@ public class CallResolver {
candidateResolver.performResolutionForCandidateCall(context, task.checkArguments);
candidateResolutionContexts.add(context);
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -304,7 +304,7 @@ public class ResolvedCallImpl<D extends CallableDescriptor> implements MutableRe
if (ArgumentMappingKt.isReallySuccess(this)) {
LOG.error("ArgumentUnmapped for " + valueArgument + " in successfully resolved call: " + call.getCallElement().getText());
}
return ArgumentUnmapped.INSTANCE$;
return ArgumentUnmapped.INSTANCE;
}
return argumentMatch;
}
@@ -580,7 +580,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
@Override
public Unit invoke(@NotNull Supertypes supertypes) {
findAndDisconnectLoopsInTypeHierarchy(supertypes.trueSupertypes);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -51,7 +51,7 @@ public final class ScopeUtils {
for (TypeParameterDescriptor typeParameterDescriptor : propertyDescriptor.getTypeParameters()) {
handler.addClassifierDescriptor(typeParameterDescriptor);
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
}
@@ -979,7 +979,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
KtSimpleNameExpression labelExpression = expression.getTargetLabel();
if (labelExpression != null) {
PsiElement labelIdentifier = labelExpression.getIdentifier();
UnderscoreChecker.INSTANCE$.checkIdentifier(labelIdentifier, context.trace);
UnderscoreChecker.INSTANCE.checkIdentifier(labelIdentifier, context.trace);
}
KtExpression baseExpression = expression.getBaseExpression();
if (baseExpression == null) return TypeInfoFactoryKt.noTypeInfo(context);
@@ -481,7 +481,7 @@ public class ControlStructureTypingVisitor extends ExpressionTypingVisitor {
components.identifierChecker.checkDeclaration(catchParameter, context.trace);
ModifiersChecker.ModifiersCheckingProcedure modifiersChecking = components.modifiersChecker.withTrace(context.trace);
modifiersChecking.checkParameterHasNoValOrVar(catchParameter, VAL_OR_VAR_ON_CATCH_PARAMETER);
ModifierCheckerCore.INSTANCE$.check(catchParameter, context.trace, null);
ModifierCheckerCore.INSTANCE.check(catchParameter, context.trace, null);
VariableDescriptor variableDescriptor = components.descriptorResolver.resolveLocalVariableDescriptor(
context.scope, catchParameter, context.trace);
@@ -37,7 +37,7 @@ public class ExpressionTypingContext extends ResolutionContext<ExpressionTypingC
@NotNull DataFlowInfo dataFlowInfo,
@NotNull KotlinType expectedType
) {
return newContext(trace, scope, dataFlowInfo, expectedType, CallChecker.DoNothing.INSTANCE$);
return newContext(trace, scope, dataFlowInfo, expectedType, CallChecker.DoNothing.INSTANCE);
}
@NotNull
@@ -133,7 +133,7 @@ public class JavaElementFinder extends PsiElementFinder implements KotlinFinderM
for (KtClassOrObject declaration : classOrObjectDeclarations) {
if (!(declaration instanceof KtEnumEntry)) {
PsiClass lightClass = LightClassUtil.INSTANCE$.getPsiClass(declaration);
PsiClass lightClass = LightClassUtil.INSTANCE.getPsiClass(declaration);
if (lightClass != null) {
answer.add(lightClass);
}
@@ -149,7 +149,7 @@ public class JavaElementFinder extends PsiElementFinder implements KotlinFinderM
for (KtClassOrObject classOrObject : lightClassGenerationSupport.findClassOrObjectDeclarations(qualifiedName.parent(), scope)) {
//NOTE: can't filter out more interfaces right away because decompiled declarations do not have member bodies
if (classOrObject instanceof KtClass && ((KtClass) classOrObject).isInterface()) {
PsiClass interfaceClass = LightClassUtil.INSTANCE$.getPsiClass(classOrObject);
PsiClass interfaceClass = LightClassUtil.INSTANCE.getPsiClass(classOrObject);
if (interfaceClass != null) {
PsiClass implsClass = interfaceClass.findInnerClassByName(JvmAbi.DEFAULT_IMPLS_CLASS_NAME, false);
if (implsClass != null) {
@@ -224,7 +224,7 @@ public class JavaElementFinder extends PsiElementFinder implements KotlinFinderM
Collection<KtClassOrObject> declarations = lightClassGenerationSupport.findClassOrObjectDeclarationsInPackage(packageFQN, scope);
for (KtClassOrObject declaration : declarations) {
PsiClass aClass = LightClassUtil.INSTANCE$.getPsiClass(declaration);
PsiClass aClass = LightClassUtil.INSTANCE.getPsiClass(declaration);
if (aClass != null) {
answer.add(aClass);
}
@@ -1,4 +1,4 @@
public class B {
public static int a = A.INSTANCE$.getC();
public static int b = A.INSTANCE$.foo();
public static int a = A.INSTANCE.getC();
public static int b = A.INSTANCE.foo();
}
@@ -351,12 +351,12 @@ public abstract class AbstractDiagnosticsTest extends BaseDiagnosticsTest {
@NotNull
protected TargetPlatform getPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
protected ModuleDescriptorImpl createModule(@NotNull String moduleName, @NotNull StorageManager storageManager) {
return TargetPlatformKt.createModule(JvmPlatform.INSTANCE$, Name.special(moduleName), storageManager);
return TargetPlatformKt.createModule(JvmPlatform.INSTANCE, Name.special(moduleName), storageManager);
}
@NotNull
@@ -76,7 +76,7 @@ public abstract class AbstractDiagnosticsTestWithJsStdLib extends AbstractDiagno
@NotNull
@Override
protected ModuleDescriptorImpl createModule(@NotNull String moduleName, @NotNull StorageManager storageManager) {
return TargetPlatformKt.createModule(JsPlatform.INSTANCE$, Name.special(moduleName), storageManager);
return TargetPlatformKt.createModule(JsPlatform.INSTANCE, Name.special(moduleName), storageManager);
}
@NotNull
@@ -104,6 +104,6 @@ public abstract class AbstractDiagnosticsTestWithJsStdLib extends AbstractDiagno
@NotNull
@Override
protected TargetPlatform getPlatform() {
return JsPlatform.INSTANCE$;
return JsPlatform.INSTANCE;
}
}
@@ -131,7 +131,7 @@ public class CodegenTestFiles {
Object value;
KotlinType jetType;
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE$.getBuiltIns();
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE.getBuiltIns();
if (type.equals("kotlin.String")) {
value = valueString;
jetType = builtIns.getStringType();
@@ -37,7 +37,7 @@ public class ScriptGenTest extends CodegenTestCase {
private static final KotlinScriptDefinition FIB_SCRIPT_DEFINITION =
new TestScriptDefinition(
".lang.kt",
singletonList(new ScriptParameter(Name.identifier("num"), JvmPlatform.INSTANCE$.getBuiltIns().getIntType()))
singletonList(new ScriptParameter(Name.identifier("num"), JvmPlatform.INSTANCE.getBuiltIns().getIntType()))
);
private static final KotlinScriptDefinition NO_PARAM_SCRIPT_DEFINITION =
new TestScriptDefinition(
@@ -58,7 +58,7 @@ public abstract class AbstractCompileJavaAgainstKotlinTest extends TestCaseWithT
options.setVerbose(true);
options.setExcludedAnnotationClasses(Collections.singleton(new FqName(Retention.class.getName())));
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
)
@@ -145,7 +145,7 @@ public abstract class ExpectedResolveData {
}
public final void checkResult(BindingContext bindingContext) {
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE$.getBuiltIns();
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE.getBuiltIns();
Set<PsiElement> unresolvedReferences = Sets.newHashSet();
for (Diagnostic diagnostic : bindingContext.getDiagnostics()) {
@@ -54,7 +54,7 @@ public class ExpectedResolveDataUtil {
}
public static Map<String, DeclarationDescriptor> prepareDefaultNameToDescriptors(Project project, KotlinCoreEnvironment environment) {
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE$.getBuiltIns();
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE.getBuiltIns();
Map<String, DeclarationDescriptor> nameToDescriptor = new HashMap<String, DeclarationDescriptor>();
nameToDescriptor.put("kotlin::Int.plus(Int)", standardFunction(builtIns.getInt(), "plus", project, builtIns.getIntType()));
@@ -135,7 +135,7 @@ public class ExpectedResolveDataUtil {
ModuleDescriptorImpl emptyModule = KotlinTestUtils.createEmptyModule();
ContainerForTests container = InjectionKt.createContainerForTests(project, emptyModule);
emptyModule.setDependencies(emptyModule);
emptyModule.initialize(PackageFragmentProvider.Empty.INSTANCE$);
emptyModule.initialize(PackageFragmentProvider.Empty.INSTANCE);
LexicalScopeImpl lexicalScope = new LexicalScopeImpl(ImportingScope.Empty.INSTANCE, classDescriptor, false,
classDescriptor.getThisAsReceiverParameter(),
@@ -63,7 +63,7 @@ public abstract class AbstractAnnotationDescriptorResolveTest extends KotlinLite
options.setVerbose(true);
options.setNameShortness(NameShortness.SHORT);
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -74,7 +74,7 @@ public class LoadBuiltinsTest extends KotlinTestWithEnvironment {
options.setVerbose(true);
options.setPrettyFunctionTypes(false);
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
)
@@ -104,13 +104,13 @@ public class LoadBuiltinsTest extends KotlinTestWithEnvironment {
private static PackageFragmentDescriptor createBuiltInsPackageFragment() {
LockBasedStorageManager storageManager = new LockBasedStorageManager();
ModuleDescriptorImpl builtInsModule = new ModuleDescriptorImpl(
Name.special("<built-ins module>"), storageManager, ModuleParameters.Empty.INSTANCE$, DefaultBuiltIns.getInstance()
Name.special("<built-ins module>"), storageManager, ModuleParameters.Empty.INSTANCE, DefaultBuiltIns.getInstance()
);
PackageFragmentProvider packageFragmentProvider = createBuiltInPackageFragmentProvider(
storageManager, builtInsModule, BUILT_INS_PACKAGE_FQ_NAMES,
new BuiltInFictitiousFunctionClassFactory(storageManager, builtInsModule),
AdditionalSupertypes.None.INSTANCE$,
AdditionalSupertypes.None.INSTANCE,
new Function1<String, InputStream>() {
@Override
public InputStream invoke(String path) {
@@ -281,7 +281,7 @@ public class StorageManagerTest extends TestCase {
new Function1<String, Unit>() {
@Override
public Unit invoke(String s) {
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -317,7 +317,7 @@ public class StorageManagerTest extends TestCase {
public Unit invoke(String s) {
counter.inc();
assertEquals("tolerant", s);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -346,7 +346,7 @@ public class StorageManagerTest extends TestCase {
public Unit invoke(Collection<String> strings) {
counter.inc();
strings.add("postComputed");
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -372,7 +372,7 @@ public class StorageManagerTest extends TestCase {
public Unit invoke(Collection<String> strings) {
counter.inc();
strings.add("postComputed");
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -405,7 +405,7 @@ public class StorageManagerTest extends TestCase {
@Override
public Unit invoke(String s) {
fail("Recursion-tolerating value should not be post computed");
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -930,7 +930,7 @@ public class KotlinTestUtils {
@NotNull
public static ModuleDescriptorImpl createEmptyModule(@NotNull String name) {
return createEmptyModule(name, JvmPlatform.INSTANCE$);
return createEmptyModule(name, JvmPlatform.INSTANCE);
}
@NotNull
@@ -57,7 +57,7 @@ public class RecursiveDescriptorComparator {
options.setNameShortness(NameShortness.FULLY_QUALIFIED);
options.setVerbose(true);
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -110,7 +110,7 @@ public class DefaultModalityModifiersTest extends KotlinLiteFixture {
new FileBasedDeclarationProviderFactory(moduleContext.getStorageManager(),
Collections.singleton(aClass.getContainingKtFile())),
new BindingTraceContext(),
TargetPlatform.Default.INSTANCE$
TargetPlatform.Default.INSTANCE
);
return (ClassDescriptorWithResolutionScopes) resolveSession.getClassDescriptor(aClass, NoLookupLocation.FROM_TEST);
@@ -172,7 +172,7 @@ public class KotlinOverloadTest extends KotlinLiteFixture {
private FunctionDescriptor makeFunction(String funDecl) {
KtNamedFunction function = KtPsiFactoryKt.KtPsiFactory(getProject()).createFunction(funDecl);
LexicalScope scope = TypeTestUtilsKt.builtInPackageAsLexicalScope(JvmPlatform.INSTANCE$.getBuiltIns());
LexicalScope scope = TypeTestUtilsKt.builtInPackageAsLexicalScope(JvmPlatform.INSTANCE.getBuiltIns());
return functionDescriptorResolver.resolveFunctionDescriptor(root, scope, function, KotlinTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
}
}
@@ -76,7 +76,7 @@ public class KotlinTypeCheckerTest extends KotlinLiteFixture {
builtIns = module.getBuiltIns();
ContainerForTests container = InjectionKt.createContainerForTests(getProject(), module);
module.setDependencies(Collections.singletonList(module));
module.initialize(PackageFragmentProvider.Empty.INSTANCE$);
module.initialize(PackageFragmentProvider.Empty.INSTANCE);
typeResolver = container.getTypeResolver();
expressionTypingServices = container.getExpressionTypingServices();
@@ -56,7 +56,7 @@ public final class DescriptorResolverUtils {
@Override
public Unit invoke(@NotNull CallableMemberDescriptor descriptor) {
errorReporter.reportCannotInferVisibility(descriptor);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
result.add((D) fakeOverride);
@@ -87,7 +87,7 @@ public class JavaMethodDescriptor extends SimpleFunctionDescriptorImpl implement
SimpleFunctionDescriptorImpl descriptor = super.initialize(
receiverParameterType, dispatchReceiverParameter, typeParameters, unsubstitutedValueParameters,
unsubstitutedReturnType, modality, visibility);
setOperator(OperatorChecks.INSTANCE$.canBeOperator(descriptor));
setOperator(OperatorChecks.INSTANCE.canBeOperator(descriptor));
return descriptor;
}
@@ -70,7 +70,7 @@ public abstract class KotlinBuiltIns {
protected KotlinBuiltIns() {
LockBasedStorageManager storageManager = new LockBasedStorageManager();
builtInsModule = new ModuleDescriptorImpl(
Name.special("<built-ins module>"), storageManager, ModuleParameters.Empty.INSTANCE$, this
Name.special("<built-ins module>"), storageManager, ModuleParameters.Empty.INSTANCE, this
);
PackageFragmentProvider packageFragmentProvider = BuiltInsPackageFragmentProviderKt.createBuiltInPackageFragmentProvider(
@@ -101,7 +101,7 @@ public abstract class KotlinBuiltIns {
@NotNull
protected AdditionalSupertypes getAdditionalSupertypesProvider() {
return AdditionalSupertypes.None.INSTANCE$;
return AdditionalSupertypes.None.INSTANCE;
}
private void makePrimitive(@NotNull PrimitiveType primitiveType) {
@@ -294,6 +294,6 @@ public class Visibilities {
static {
Iterator<ModuleVisibilityHelper> iterator = ServiceLoader.load(ModuleVisibilityHelper.class, ModuleVisibilityHelper.class.getClassLoader()).iterator();
MODULE_VISIBILITY_HELPER = iterator.hasNext() ? iterator.next() : ModuleVisibilityHelper.EMPTY.INSTANCE$;
MODULE_VISIBILITY_HELPER = iterator.hasNext() ? iterator.next() : ModuleVisibilityHelper.EMPTY.INSTANCE;
}
}
@@ -40,7 +40,7 @@ public class MemberComparator implements Comparator<DeclarationDescriptor> {
options.setWithDefinedIn(false);
options.setVerbose(true);
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
@@ -35,7 +35,7 @@ public abstract class AbstractKotlinType implements KotlinType {
@NotNull
@Override
public TypeCapabilities getCapabilities() {
return TypeCapabilities.NONE.INSTANCE$;
return TypeCapabilities.NONE.INSTANCE;
}
@Override
@@ -239,7 +239,7 @@ public class SourceNavigationHelper {
@NotNull Project project
) {
TargetPlatform platform = TargetPlatform.Default.INSTANCE$;
TargetPlatform platform = TargetPlatform.Default.INSTANCE;
MutableModuleContext newModuleContext = ContextKt.ContextForNewModule(
project, Name.special("<library module>"),
ModuleDescriptorKt.ModuleParameters(
@@ -375,13 +375,13 @@ public class SourceNavigationHelper {
);
}
}
return LightClassUtil.INSTANCE$.getPsiClass(classOrObject);
return LightClassUtil.INSTANCE.getPsiClass(classOrObject);
}
@Nullable
public static PsiClass getOriginalClass(@NotNull KtClassOrObject classOrObject) {
// Copied from JavaPsiImplementationHelperImpl:getOriginalClass()
String internalName = PsiCodegenPredictor.getPredefinedJvmInternalName(classOrObject, NoResolveFileClassesProvider.INSTANCE$);
String internalName = PsiCodegenPredictor.getPredefinedJvmInternalName(classOrObject, NoResolveFileClassesProvider.INSTANCE);
if (internalName == null) {
return null;
}
@@ -40,7 +40,7 @@ public class DuplicateJvmSignatureAnnotator implements Annotator {
if (!ProjectRootsUtil.isInProjectSource(element)) return;
PsiFile file = element.getContainingFile();
if (!(file instanceof KtFile) || TargetPlatformDetector.getPlatform((KtFile) file) != JvmPlatform.INSTANCE$) return;
if (!(file instanceof KtFile) || TargetPlatformDetector.getPlatform((KtFile) file) != JvmPlatform.INSTANCE) return;
Diagnostics otherDiagnostics = ResolutionUtils.analyzeFully((KtElement) element).getDiagnostics();
GlobalSearchScope moduleScope = GetModuleInfoKt.getModuleInfo(element).contentScope();
@@ -210,7 +210,7 @@ public class HtmlTabledDescriptorRenderer extends TabledDescriptorRenderer {
options.setModifiers(Collections.<DescriptorRendererModifier>emptySet());
options.setValueParametersHandler(VALUE_PARAMETERS_HANDLER);
options.setTextFormat(RenderingFormat.HTML);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
});
@@ -155,8 +155,8 @@ public class IdeErrorMessages {
"</html>",
HTML_THROWABLE);
MAP.put(ErrorsJs.JSCODE_ERROR, "<html>JavaScript: {0}</html>", JsCallDataHtmlRenderer.INSTANCE$);
MAP.put(ErrorsJs.JSCODE_WARNING, "<html>JavaScript: {0}</html>", JsCallDataHtmlRenderer.INSTANCE$);
MAP.put(ErrorsJs.JSCODE_ERROR, "<html>JavaScript: {0}</html>", JsCallDataHtmlRenderer.INSTANCE);
MAP.put(ErrorsJs.JSCODE_WARNING, "<html>JavaScript: {0}</html>", JsCallDataHtmlRenderer.INSTANCE);
MAP.setImmutable();
}
@@ -50,14 +50,14 @@ public class TargetPlatformDetector {
@NotNull
public static TargetPlatform getPlatform(@NotNull Module module) {
if (ProjectStructureUtil.isJsKotlinModule(module)) {
return JsPlatform.INSTANCE$;
return JsPlatform.INSTANCE;
}
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
public static TargetPlatform getDefaultPlatform() {
LOG.info("Using default platform");
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
}
@@ -33,7 +33,7 @@ public abstract class AbstractJSBasicCompletionTest extends KotlinFixtureComplet
@NotNull
@Override
public TargetPlatform getPlatform() {
return JsPlatform.INSTANCE$;
return JsPlatform.INSTANCE;
}
@NotNull
@@ -33,7 +33,7 @@ public abstract class AbstractJvmBasicCompletionTest extends KotlinFixtureComple
@NotNull
@Override
public TargetPlatform getPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
@@ -33,7 +33,7 @@ public abstract class AbstractJvmSmartCompletionTest extends KotlinFixtureComple
@NotNull
@Override
public TargetPlatform getPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
@@ -52,8 +52,8 @@ public class PluginStartupComponent implements ApplicationComponent {
public void initComponent() {
registerPathVariable();
JarUserDataManager.INSTANCE$.register(KotlinJavaScriptLibraryDetectionUtil.HasKotlinJSMetadataInJar.INSTANCE$);
JarUserDataManager.INSTANCE$.register(HasCompiledKotlinInJar.INSTANCE$);
JarUserDataManager.INSTANCE.register(KotlinJavaScriptLibraryDetectionUtil.HasKotlinJSMetadataInJar.INSTANCE);
JarUserDataManager.INSTANCE.register(HasCompiledKotlinInJar.INSTANCE);
DebuggerFiltersUtilKt.addKotlinStdlibDebugFilterIfNeeded();
@@ -86,7 +86,7 @@ public class ConfigureKotlinInProjectUtils {
}
private static void showConfigureKotlinNotification(@NotNull Project project) {
ConfigureKotlinNotificationManager.INSTANCE$.notify(project);
ConfigureKotlinNotificationManager.INSTANCE.notify(project);
}
@NotNull
@@ -38,7 +38,7 @@ public class KotlinAndroidGradleModuleConfigurator extends KotlinWithGradleConfi
@NotNull
@Override
public TargetPlatform getTargetPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
@@ -38,7 +38,7 @@ public class KotlinGradleModuleConfigurator extends KotlinWithGradleConfigurator
@NotNull
@Override
public TargetPlatform getTargetPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
@@ -47,6 +47,6 @@ public class KotlinJavaMavenConfigurator extends KotlinMavenConfigurator {
@NotNull
@Override
public TargetPlatform getTargetPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
}
@@ -79,7 +79,7 @@ public class KotlinJavaModuleConfigurator extends KotlinWithLibraryConfigurator
@NotNull
@Override
public TargetPlatform getTargetPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
@@ -62,6 +62,6 @@ public class KotlinJavascriptMavenConfigurator extends KotlinMavenConfigurator {
@NotNull
@Override
public TargetPlatform getTargetPlatform() {
return JsPlatform.INSTANCE$;
return JsPlatform.INSTANCE;
}
}
@@ -42,7 +42,7 @@ public class KotlinJsModuleConfigurator extends KotlinWithLibraryConfigurator {
@NotNull
@Override
public TargetPlatform getTargetPlatform() {
return JsPlatform.INSTANCE$;
return JsPlatform.INSTANCE;
}
@NotNull
@@ -62,7 +62,7 @@ public class KotlinFindClassUsagesDialog extends FindClassUsagesDialog {
@NotNull
private static PsiClass getRepresentingPsiClass(@NotNull KtClassOrObject classOrObject) {
PsiClass lightClass = LightClassUtil.INSTANCE$.getPsiClass(classOrObject);
PsiClass lightClass = LightClassUtil.INSTANCE.getPsiClass(classOrObject);
if (lightClass != null) return lightClass;
// TODO: Remove this code when light classes are generated for builtins
@@ -264,7 +264,7 @@ public class KotlinBlock extends AbstractBlock {
}
}
return WrappingStrategy.NoWrapping.INSTANCE$;
return WrappingStrategy.NoWrapping.INSTANCE;
}
private NodeAlignmentStrategy getChildrenAlignmentStrategy() {
@@ -100,15 +100,15 @@ public class KotlinModuleSettingStep extends ModuleWizardStep {
@NotNull
protected String getLibraryLabelText() {
if (targetPlatform == JvmPlatform.INSTANCE$) return "\u001BKotlin runtime:";
if (targetPlatform == JsPlatform.INSTANCE$) return "\u001BKotlin JS library:";
if (targetPlatform == JvmPlatform.INSTANCE) return "\u001BKotlin runtime:";
if (targetPlatform == JsPlatform.INSTANCE) return "\u001BKotlin JS library:";
throw new IllegalStateException("Only JS and JVM target are supported");
}
@NotNull
protected CustomLibraryDescription getCustomLibraryDescription(@Nullable Project project) {
if (targetPlatform == JvmPlatform.INSTANCE$) return new JavaRuntimeLibraryDescription(project);
if (targetPlatform == JsPlatform.INSTANCE$) return new JSLibraryStdDescription(project);
if (targetPlatform == JvmPlatform.INSTANCE) return new JavaRuntimeLibraryDescription(project);
if (targetPlatform == JsPlatform.INSTANCE) return new JSLibraryStdDescription(project);
throw new IllegalStateException("Only JS and JVM target are supported");
}
@@ -92,17 +92,17 @@ public abstract class KotlinCallTreeStructure extends HierarchyTreeStructure {
}
if (element instanceof KtNamedFunction || element instanceof KtSecondaryConstructor) {
return LightClassUtil.INSTANCE$.getLightClassMethod((KtFunction) element);
return LightClassUtil.INSTANCE.getLightClassMethod((KtFunction) element);
}
if (element instanceof KtProperty) {
LightClassUtil.PropertyAccessorsPsiMethods propertyMethods =
LightClassUtil.INSTANCE$.getLightClassPropertyMethods((KtProperty) element);
LightClassUtil.INSTANCE.getLightClassPropertyMethods((KtProperty) element);
return (propertyMethods.getGetter() != null) ? propertyMethods.getGetter() : propertyMethods.getSetter();
}
if (element instanceof KtClassOrObject) {
PsiClass psiClass = LightClassUtil.INSTANCE$.getPsiClass((KtClassOrObject) element);
PsiClass psiClass = LightClassUtil.INSTANCE.getPsiClass((KtClassOrObject) element);
if (psiClass == null) return null;
PsiMethod[] constructors = psiClass.getConstructors();
@@ -104,18 +104,18 @@ public class KotlinCallerMethodsTreeStructure extends KotlinCallTreeStructure {
);
}
if (element instanceof KtNamedFunction || element instanceof KtSecondaryConstructor) {
Collection<PsiMethod> lightMethods = LightClassUtil.INSTANCE$.getLightClassMethods((KtFunction) element);
Collection<PsiMethod> lightMethods = LightClassUtil.INSTANCE.getLightClassMethods((KtFunction) element);
processPsiMethodCallers(lightMethods, descriptor, methodToDescriptorMap, searchScope, false);
}
if (element instanceof KtProperty) {
LightClassUtil.PropertyAccessorsPsiMethods propertyMethods =
LightClassUtil.INSTANCE$.getLightClassPropertyMethods((KtProperty) element);
LightClassUtil.INSTANCE.getLightClassPropertyMethods((KtProperty) element);
processPsiMethodCallers(propertyMethods, descriptor, methodToDescriptorMap, searchScope, false);
}
if (element instanceof KtClassOrObject) {
KtPrimaryConstructor constructor = ((KtClassOrObject) element).getPrimaryConstructor();
if (constructor != null) {
PsiMethod lightMethod = LightClassUtil.INSTANCE$.getLightClassMethod(constructor);
PsiMethod lightMethod = LightClassUtil.INSTANCE.getLightClassMethod(constructor);
processPsiMethodCallers(Collections.singleton(lightMethod), descriptor, methodToDescriptorMap, searchScope, false);
}
else {
@@ -117,7 +117,7 @@ public class KotlinRefactoringUtil {
Project project = declaration.getProject();
Map<PsiElement, CallableDescriptor> overriddenElementsToDescriptor = new HashMap<PsiElement, CallableDescriptor>();
for (CallableDescriptor overriddenDescriptor : DescriptorUtils.getAllOverriddenDescriptors(declarationDescriptor)) {
PsiElement overriddenDeclaration = DescriptorToSourceUtilsIde.INSTANCE$.getAnyDeclaration(project, overriddenDescriptor);
PsiElement overriddenDeclaration = DescriptorToSourceUtilsIde.INSTANCE.getAnyDeclaration(project, overriddenDescriptor);
if (PsiTreeUtil.instanceOf(overriddenDeclaration, KtNamedFunction.class, KtProperty.class, PsiMethod.class)) {
overriddenElementsToDescriptor.put(overriddenDeclaration, overriddenDescriptor);
}
@@ -83,7 +83,7 @@ public class KotlinTestNgConfigurationProducer extends TestNGConfigurationProduc
KtElement owner = PsiTreeUtil.getParentOfType(function, KtFunction.class, KtClass.class);
if (owner instanceof KtClass) {
PsiClass delegate = LightClassUtil.INSTANCE$.getPsiClass((KtClass) owner);
PsiClass delegate = LightClassUtil.INSTANCE.getPsiClass((KtClass) owner);
if (delegate != null) {
for (PsiMethod method : delegate.getMethods()) {
if (method.getNavigationElement() == function) {
@@ -98,7 +98,7 @@ public class KotlinTestNgConfigurationProducer extends TestNGConfigurationProduc
}
if (declarationToRun instanceof KtClass) {
PsiClass delegate = LightClassUtil.INSTANCE$.getPsiClass((KtClassOrObject) declarationToRun);
PsiClass delegate = LightClassUtil.INSTANCE.getPsiClass((KtClassOrObject) declarationToRun);
if (!isTestNGClass(delegate)) {
return false;
}
@@ -86,7 +86,7 @@ public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, Defi
PsiClass psiClass = ApplicationManager.getApplication().runReadAction(new Computable<PsiClass>() {
@Override
public PsiClass compute() {
return LightClassUtil.INSTANCE$.getPsiClass(klass);
return LightClassUtil.INSTANCE.getPsiClass(klass);
}
});
if (psiClass != null) {
@@ -99,7 +99,7 @@ public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, Defi
PsiMethod psiMethod = ApplicationManager.getApplication().runReadAction(new Computable<PsiMethod>() {
@Override
public PsiMethod compute() {
return LightClassUtil.INSTANCE$.getLightClassMethod(function);
return LightClassUtil.INSTANCE.getLightClassMethod(function);
}
});
@@ -115,7 +115,7 @@ public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, Defi
new Computable<LightClassUtil.PropertyAccessorsPsiMethods>() {
@Override
public LightClassUtil.PropertyAccessorsPsiMethods compute() {
return LightClassUtil.INSTANCE$.getLightClassPropertyMethods(parameter);
return LightClassUtil.INSTANCE.getLightClassPropertyMethods(parameter);
}
});
@@ -127,7 +127,7 @@ public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, Defi
new Computable<LightClassUtil.PropertyAccessorsPsiMethods>() {
@Override
public LightClassUtil.PropertyAccessorsPsiMethods compute() {
return LightClassUtil.INSTANCE$.getLightClassPropertyMethods(property);
return LightClassUtil.INSTANCE.getLightClassPropertyMethods(property);
}
});
@@ -67,7 +67,7 @@ public class KotlinRuntimeLibraryUtil {
@NotNull
public static Collection<VirtualFile> getLibraryRootsWithAbiIncompatibleKotlinClasses(@NotNull Project project) {
return getLibraryRootsWithAbiIncompatibleVersion(
project, KotlinAbiVersionIndex.INSTANCE$,
project, KotlinAbiVersionIndex.INSTANCE,
new Function1<Module, Boolean>() {
@Override
public Boolean invoke(@Nullable Module module) {
@@ -85,7 +85,7 @@ public class KotlinRuntimeLibraryUtil {
@NotNull
public static Collection<VirtualFile> getLibraryRootsWithAbiIncompatibleForKotlinJs(@NotNull Project project) {
return getLibraryRootsWithAbiIncompatibleVersion(
project, KotlinJavaScriptAbiVersionIndex.INSTANCE$,
project, KotlinJavaScriptAbiVersionIndex.INSTANCE,
new Function1<Module, Boolean>() {
@Override
public Boolean invoke(@Nullable Module module) {
@@ -1,5 +1,5 @@
// "Replace with reference to 'INSTANCE' field" "true"
import static a.A.INSTANCE$;
import static a.A.INSTANCE;
class B {
void bar() {
@@ -38,11 +38,11 @@ public abstract class AbstractPsiCheckerTest extends KotlinLightCodeInsightFixtu
//noinspection unchecked
myFixture.enableInspections(SpellCheckingInspection.class);
NameHighlighter.INSTANCE$.setNamesHighlightingEnabled(false);
NameHighlighter.INSTANCE.setNamesHighlightingEnabled(false);
checkHighlighting(true, true, false);
}
finally {
NameHighlighter.INSTANCE$.setNamesHighlightingEnabled(true);
NameHighlighter.INSTANCE.setNamesHighlightingEnabled(true);
}
}
@@ -123,13 +123,13 @@ public abstract class AbstractIntentionTest extends KotlinCodeInsightTestCase {
}
if (getFile() instanceof KtFile && !InTextDirectivesUtils.isDirectiveDefined(fileText, "// SKIP_ERRORS_BEFORE")) {
DirectiveBasedActionUtils.INSTANCE$.checkForUnexpectedErrors((KtFile) getFile());
DirectiveBasedActionUtils.INSTANCE.checkForUnexpectedErrors((KtFile) getFile());
}
doTestFor(pathToFile, intentionAction, fileText);
if (getFile() instanceof KtFile && !InTextDirectivesUtils.isDirectiveDefined(fileText, "// SKIP_ERRORS_AFTER")) {
DirectiveBasedActionUtils.INSTANCE$.checkForUnexpectedErrors((KtFile) getFile());
DirectiveBasedActionUtils.INSTANCE.checkForUnexpectedErrors((KtFile) getFile());
}
}
finally {
@@ -212,7 +212,7 @@ public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase
assertInstanceOf(element, KtClass.class);
KtClass aClass = (KtClass) element;
PsiClass createdByWrapDelegate = LightClassUtil.INSTANCE$.getPsiClass(aClass);
PsiClass createdByWrapDelegate = LightClassUtil.INSTANCE.getPsiClass(aClass);
assertNull(createdByWrapDelegate);
}
@@ -220,7 +220,7 @@ public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase
KtNamedFunction jetFunction = getPreparedElement(KtNamedFunction.class);
// Should not fail!
PsiMethod psiMethod = LightClassUtil.INSTANCE$.getLightClassMethod(jetFunction);
PsiMethod psiMethod = LightClassUtil.INSTANCE.getLightClassMethod(jetFunction);
checkDeclarationMethodWrapped(shouldBeWrapped, jetFunction, psiMethod);
}
@@ -229,7 +229,7 @@ public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase
KtParameter jetParameter = getPreparedElement(KtParameter.class);
// Should not fail!
LightClassUtil.PropertyAccessorsPsiMethods propertyAccessors = LightClassUtil.INSTANCE$.getLightClassPropertyMethods(jetParameter);
LightClassUtil.PropertyAccessorsPsiMethods propertyAccessors = LightClassUtil.INSTANCE.getLightClassPropertyMethods(jetParameter);
checkDeclarationMethodWrapped(shouldWrapGetter, jetParameter, propertyAccessors.getGetter());
checkDeclarationMethodWrapped(shouldWrapSetter, jetParameter, propertyAccessors.getSetter());
@@ -239,7 +239,7 @@ public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase
KtProperty jetProperty = getPreparedElement(KtProperty.class);
// Should not fail!
LightClassUtil.PropertyAccessorsPsiMethods propertyAccessors = LightClassUtil.INSTANCE$.getLightClassPropertyMethods(jetProperty);
LightClassUtil.PropertyAccessorsPsiMethods propertyAccessors = LightClassUtil.INSTANCE.getLightClassPropertyMethods(jetProperty);
checkDeclarationMethodWrapped(shouldWrapGetter, jetProperty, propertyAccessors.getGetter());
checkDeclarationMethodWrapped(shouldWrapSetter, jetProperty, propertyAccessors.getSetter());
@@ -249,7 +249,7 @@ public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase
KtPropertyAccessor jetPropertyAccessor = getPreparedElement(KtPropertyAccessor.class);
// Should not fail!
PsiMethod propertyAccessors = LightClassUtil.INSTANCE$.getLightClassAccessorMethod(jetPropertyAccessor);
PsiMethod propertyAccessors = LightClassUtil.INSTANCE.getLightClassAccessorMethod(jetPropertyAccessor);
checkDeclarationMethodWrapped(shouldWrapAccessor,
PsiTreeUtil.getParentOfType(jetPropertyAccessor, KtProperty.class),
propertyAccessors);
@@ -296,7 +296,7 @@ public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase
assertNotNull("Caret should be placed to class definition", ktClass);
// Should not fail!
KtLightClass lightClass = (KtLightClass) LightClassUtil.INSTANCE$.getPsiClass(ktClass);
KtLightClass lightClass = (KtLightClass) LightClassUtil.INSTANCE.getPsiClass(ktClass);
assertNotNull(String.format("Failed to wrap jetClass '%s' to class", ktClass.getText()), lightClass);
@@ -58,8 +58,8 @@ public class LightClassEqualsTest extends KotlinLightCodeInsightFixtureTestCase
private static void doTestEquals(@Nullable KtClassOrObject origin) {
assertNotNull(origin);
PsiClass lightClass1 = LightClassUtil.INSTANCE$.getPsiClass(origin);
PsiClass lightClass2 = LightClassUtil.INSTANCE$.getPsiClass(origin);
PsiClass lightClass1 = LightClassUtil.INSTANCE.getPsiClass(origin);
PsiClass lightClass2 = LightClassUtil.INSTANCE.getPsiClass(origin);
assertNotNull(lightClass1);
assertNotNull(lightClass2);
@@ -180,7 +180,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
boolean actionShouldBeAvailable = pair.getSecond();
if (psiFile instanceof KtFile) {
DirectiveBasedActionUtils.INSTANCE$.checkForUnexpectedErrors((KtFile) psiFile);
DirectiveBasedActionUtils.INSTANCE.checkForUnexpectedErrors((KtFile) psiFile);
}
doAction(text, actionShouldBeAvailable, getTestName(false));
@@ -270,7 +270,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
boolean actionShouldBeAvailable = pair.getSecond();
if (psiFile instanceof KtFile) {
DirectiveBasedActionUtils.INSTANCE$.checkForUnexpectedErrors((KtFile) psiFile);
DirectiveBasedActionUtils.INSTANCE.checkForUnexpectedErrors((KtFile) psiFile);
}
doAction(text, actionShouldBeAvailable, beforeFileName);
@@ -341,7 +341,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
"Infos:" + infos);
}
else {
DirectiveBasedActionUtils.INSTANCE$.checkAvailableActionsAreExpected(getFile(), availableActions);
DirectiveBasedActionUtils.INSTANCE.checkAvailableActionsAreExpected(getFile(), availableActions);
}
}
else {
@@ -42,13 +42,13 @@ public abstract class AbstractMultiFileHighlightingTest extends CompletionTestCa
public void doTest(@NotNull String filePath) throws Exception {
configureByFile(new File(filePath).getName(), "");
boolean shouldFail = getName().contains("UnspecifiedType");
AstAccessControl.INSTANCE$.testWithControlledAccessToAst(
AstAccessControl.INSTANCE.testWithControlledAccessToAst(
shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(),
new Function0<Unit>() {
@Override
public Unit invoke() {
checkHighlighting(myEditor, true, false);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -43,13 +43,13 @@ public abstract class AbstractResolveByStubTest extends KotlinCodeInsightTestCas
configureByFile(path);
TestUtilsKt.configureAs(getModule(), KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE);
boolean shouldFail = getTestName(false).equals("ClassWithConstVal");
AstAccessControl.INSTANCE$.testWithControlledAccessToAst(
AstAccessControl.INSTANCE.testWithControlledAccessToAst(
shouldFail, getProject(), getTestRootDisposable(),
new Function0<Unit>() {
@Override
public Unit invoke() {
performTest(path, checkPrimaryConstructors, checkPropertyAccessors);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -26,7 +26,7 @@ public class JsEmptyExpression extends JsExpressionImpl {
@Override
@NotNull
public JsStatement makeStmt() {
return JsEmpty.INSTANCE$;
return JsEmpty.INSTANCE;
}
@Override
@@ -48,7 +48,7 @@ public final class TopDownAnalyzerFacadeForJS {
BindingTrace trace = new BindingTraceContext();
MutableModuleContext newModuleContext = ContextKt.ContextForNewModule(
config.getProject(), Name.special("<" + config.getModuleId() + ">"), JsPlatform.INSTANCE$
config.getProject(), Name.special("<" + config.getModuleId() + ">"), JsPlatform.INSTANCE
);
newModuleContext.setDependencies(computeDependencies(newModuleContext.getModule(), config));
return analyzeFilesWithGivenTrace(files, trace, newModuleContext, config);
@@ -59,7 +59,7 @@ public final class TopDownAnalyzerFacadeForJS {
List<ModuleDescriptorImpl> allDependencies = new ArrayList<ModuleDescriptorImpl>();
allDependencies.add(module);
allDependencies.addAll(config.getModuleDescriptors());
allDependencies.add(JsPlatform.INSTANCE$.getBuiltIns().getBuiltInsModule());
allDependencies.add(JsPlatform.INSTANCE.getBuiltIns().getBuiltInsModule());
return allDependencies;
}
@@ -160,19 +160,19 @@ public abstract class Config {
", but metadata.abiVersion = " + metadata.getAbiVersion();
ModuleDescriptorImpl moduleDescriptor = TargetPlatformKt.createModule(
JsPlatform.INSTANCE$, Name.special("<" + metadata.getModuleName() + ">"), storageManager
JsPlatform.INSTANCE, Name.special("<" + metadata.getModuleName() + ">"), storageManager
);
PackageFragmentProvider provider =
KotlinJavascriptSerializationUtil.createPackageFragmentProvider(moduleDescriptor, metadata.getBody(), storageManager);
moduleDescriptor.initialize(provider != null ? provider : PackageFragmentProvider.Empty.INSTANCE$);
moduleDescriptor.initialize(provider != null ? provider : PackageFragmentProvider.Empty.INSTANCE);
return moduleDescriptor;
}
private static void setDependencies(ModuleDescriptorImpl module, List<ModuleDescriptorImpl> modules) {
module.setDependencies(CollectionsKt.plus(modules, JsPlatform.INSTANCE$.getBuiltIns().getBuiltInsModule()));
module.setDependencies(CollectionsKt.plus(modules, JsPlatform.INSTANCE.getBuiltIns().getBuiltInsModule()));
}
@NotNull
@@ -114,7 +114,7 @@ public class LibrarySourcesConfig extends Config {
metadata.addAll(KotlinJavascriptMetadataUtils.loadMetadata(libraryPath));
}
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
};
@@ -37,8 +37,8 @@ public interface ErrorsJs {
DiagnosticFactory0<KtDeclaration> NATIVE_GETTER_RETURN_TYPE_SHOULD_BE_NULLABLE = DiagnosticFactory0.create(ERROR, DECLARATION_RETURN_TYPE);
DiagnosticFactory0<KtDeclaration> NATIVE_SETTER_WRONG_RETURN_TYPE = DiagnosticFactory0.create(ERROR, DECLARATION_RETURN_TYPE);
DiagnosticFactory2<KtElement, Integer, String> NATIVE_INDEXER_WRONG_PARAMETER_COUNT = DiagnosticFactory2.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
DiagnosticFactory1<KtExpression, JsCallData> JSCODE_ERROR = DiagnosticFactory1.create(ERROR, JsCodePositioningStrategy.INSTANCE$);
DiagnosticFactory1<KtExpression, JsCallData> JSCODE_WARNING = DiagnosticFactory1.create(WARNING, JsCodePositioningStrategy.INSTANCE$);
DiagnosticFactory1<KtExpression, JsCallData> JSCODE_ERROR = DiagnosticFactory1.create(ERROR, JsCodePositioningStrategy.INSTANCE);
DiagnosticFactory1<KtExpression, JsCallData> JSCODE_WARNING = DiagnosticFactory1.create(WARNING, JsCodePositioningStrategy.INSTANCE);
DiagnosticFactory0<KtExpression> JSCODE_ARGUMENT_SHOULD_BE_CONSTANT = DiagnosticFactory0.create(ERROR, DEFAULT);
DiagnosticFactory1<KtElement, KtElement> NOT_SUPPORTED = DiagnosticFactory1.create(ERROR, DEFAULT);
DiagnosticFactory1<KtElement, KtElement> REFERENCE_TO_BUILTIN_MEMBERS_NOT_SUPPORTED = DiagnosticFactory1.create(ERROR, DEFAULT);
@@ -517,7 +517,7 @@ public class JsAstMapper {
toForIn.setBody(bodyStmt);
}
else {
toForIn.setBody(JsEmpty.INSTANCE$);
toForIn.setBody(JsEmpty.INSTANCE);
}
return toForIn;
@@ -545,7 +545,7 @@ public class JsAstMapper {
toFor.setBody(bodyStmt);
}
else {
toFor.setBody(JsEmpty.INSTANCE$);
toFor.setBody(JsEmpty.INSTANCE);
}
return toFor;
}
@@ -892,7 +892,7 @@ public class JsAstMapper {
else {
// When map() returns null, we return an empty statement.
//
return JsEmpty.INSTANCE$;
return JsEmpty.INSTANCE;
}
}
@@ -46,8 +46,8 @@ public final class Namer {
public static final JsNameRef KOTLIN_OBJECT_REF = new JsNameRef(KOTLIN_NAME);
public static final JsNameRef KOTLIN_LONG_NAME_REF = new JsNameRef("Long", KOTLIN_OBJECT_REF);
public static final String EQUALS_METHOD_NAME = getStableMangledNameForDescriptor(JsPlatform.INSTANCE$.getBuiltIns().getAny(), "equals");
public static final String COMPARE_TO_METHOD_NAME = getStableMangledNameForDescriptor(JsPlatform.INSTANCE$.getBuiltIns().getComparable(), "compareTo");
public static final String EQUALS_METHOD_NAME = getStableMangledNameForDescriptor(JsPlatform.INSTANCE.getBuiltIns().getAny(), "equals");
public static final String COMPARE_TO_METHOD_NAME = getStableMangledNameForDescriptor(JsPlatform.INSTANCE.getBuiltIns().getComparable(), "compareTo");
public static final String NUMBER_RANGE = "NumberRange";
public static final String CHAR_RANGE = "CharRange";
public static final String LONG_FROM_NUMBER = "fromNumber";
@@ -243,7 +243,7 @@ public final class StaticContext {
public JsName apply(@NotNull DeclarationDescriptor descriptor) {
if (isDynamic(descriptor)) {
String name = descriptor.getName().asString();
return JsDynamicScope.INSTANCE$.declareName(name);
return JsDynamicScope.INSTANCE.declareName(name);
}
return null;
@@ -159,7 +159,7 @@ public final class ExpressionVisitor extends TranslatorVisitor<JsNode> {
if (expressionInside != null) {
return Translation.translateExpression(expressionInside, context);
}
return JsEmpty.INSTANCE$;
return JsEmpty.INSTANCE;
}
@Override
@@ -191,7 +191,7 @@ public final class ExpressionVisitor extends TranslatorVisitor<JsNode> {
@Override
@NotNull
public JsNode visitCallableReferenceExpression(@NotNull KtCallableReferenceExpression expression, @NotNull TranslationContext context) {
return CallableReferenceTranslator.INSTANCE$.translate(expression, context);
return CallableReferenceTranslator.INSTANCE.translate(expression, context);
}
@Override
@@ -63,7 +63,7 @@ public final class WhenTranslator extends AbstractTranslator {
private JsStatement translate() {
if (expressionToMatch != null && JsAstUtils.isEmptyExpression(expressionToMatch)) {
return JsEmpty.INSTANCE$;
return JsEmpty.INSTANCE;
}
JsIf currentIf = null;
@@ -232,6 +232,6 @@ public final class Translation {
}
FunctionDescriptor functionDescriptor = getFunctionDescriptor(context.bindingContext(), mainFunction);
JsArrayLiteral argument = new JsArrayLiteral(toStringLiteralList(arguments, context.program()));
return CallTranslator.INSTANCE$.buildCall(context, functionDescriptor, Collections.singletonList(argument), null).makeStmt();
return CallTranslator.INSTANCE.buildCall(context, functionDescriptor, Collections.singletonList(argument), null).makeStmt();
}
}
@@ -40,13 +40,13 @@ public final class FunctionIntrinsics {
}
private void registerFactories() {
register(LongOperationFIF.INSTANCE$);
register(LongOperationFIF.INSTANCE);
register(PrimitiveUnaryOperationFIF.INSTANCE);
register(PrimitiveBinaryOperationFIF.INSTANCE);
register(StringOperationFIF.INSTANCE);
register(ArrayFIF.INSTANCE);
register(TopLevelFIF.INSTANCE);
register(NumberAndCharConversionFIF.INSTANCE$);
register(NumberAndCharConversionFIF.INSTANCE);
register(ProgressionCompanionFIF.INSTANCE);
}
@@ -200,7 +200,7 @@ public final class TopLevelFIF extends CompositeFIF {
}
}
String mangledName = getStableMangledNameForDescriptor(JsPlatform.INSTANCE$.getBuiltIns().getMutableMap(), operationName());
String mangledName = getStableMangledNameForDescriptor(JsPlatform.INSTANCE.getBuiltIns().getMutableMap(), operationName());
return new JsInvocation(new JsNameRef(mangledName, thisOrReceiver), arguments);
}
@@ -131,6 +131,6 @@ public final class CallExpressionTranslator extends AbstractCallExpressionTransl
assert currentScope instanceof JsFunctionScope : "Usage of js outside of function is unexpected";
JsScope temporaryRootScope = new JsRootScope(new JsProgram("<js code>"));
JsScope scope = new DelegatingJsFunctionScopeWithTemporaryParent((JsFunctionScope) currentScope, temporaryRootScope);
return ParserUtilsKt.parse(jsCode, ThrowExceptionOnErrorReporter.INSTANCE$, scope);
return ParserUtilsKt.parse(jsCode, ThrowExceptionOnErrorReporter.INSTANCE, scope);
}
}
@@ -63,13 +63,13 @@ public class VariableAccessTranslator extends AbstractTranslator implements Acce
@NotNull
@Override
public JsExpression translateAsGet() {
return CallTranslator.INSTANCE$.translateGet(context(), resolvedCall, receiver);
return CallTranslator.INSTANCE.translateGet(context(), resolvedCall, receiver);
}
@NotNull
@Override
public JsExpression translateAsSet(@NotNull JsExpression setTo) {
return CallTranslator.INSTANCE$.translateSet(context(), resolvedCall, setTo, receiver);
return CallTranslator.INSTANCE.translateSet(context(), resolvedCall, setTo, receiver);
}
@NotNull
@@ -60,7 +60,7 @@ public final class JSTestGenerator {
@NotNull ClassDescriptor classDescriptor, @NotNull JSTester tester) {
JsExpression expression = ReferenceTranslator.translateAsFQReference(classDescriptor, context);
JsNew testClass = new JsNew(expression);
JsExpression functionToTestCall = CallTranslator.INSTANCE$.buildCall(context, functionDescriptor,
JsExpression functionToTestCall = CallTranslator.INSTANCE.buildCall(context, functionDescriptor,
Collections.<JsExpression>emptyList(), testClass);
JsStringLiteral testName = context.program().getStringLiteral(classDescriptor.getName() + "." + functionDescriptor.getName());
tester.constructTestMethodInvocation(functionToTestCall, testName);