final modifiers added as suggested by IDEA
This commit is contained in:
@@ -168,6 +168,7 @@ public abstract class AnnotationCodegen {
|
||||
String value = null;
|
||||
if (annotations != null) {
|
||||
for (AnnotationDescriptor annotation : annotations) {
|
||||
//noinspection ConstantConditions
|
||||
if ("Intrinsic".equals(annotation.getType().getConstructor().getDeclarationDescriptor().getName().getName())) {
|
||||
value = (String) annotation.getValueArguments().get(0).getValue();
|
||||
break;
|
||||
@@ -175,6 +176,7 @@ public abstract class AnnotationCodegen {
|
||||
}
|
||||
}
|
||||
if (IntrinsicMethods.KOTLIN_JAVA_CLASS_FUNCTION.equals(value)) {
|
||||
//noinspection ConstantConditions
|
||||
annotationVisitor.visit(keyName, typeMapper
|
||||
.mapType(call.getResultingDescriptor().getReturnType().getArguments().get(0).getType(), MapTypeMode.VALUE));
|
||||
return;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
|
||||
static class LoopBlockStackElement extends BlockStackElement {
|
||||
final Label continueLabel;
|
||||
final Label breakLabel;
|
||||
public JetSimpleNameExpression targetLabel;
|
||||
public final JetSimpleNameExpression targetLabel;
|
||||
|
||||
LoopBlockStackElement(Label breakLabel, Label continueLabel, JetSimpleNameExpression targetLabel) {
|
||||
this.breakLabel = breakLabel;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ObjectOrClosureCodegen {
|
||||
protected final CodegenContext context;
|
||||
protected ClassBuilder cv = null;
|
||||
public JvmClassName name = null;
|
||||
protected Map<DeclarationDescriptor, EnclosedValueDescriptor> closure =
|
||||
protected final Map<DeclarationDescriptor, EnclosedValueDescriptor> closure =
|
||||
new LinkedHashMap<DeclarationDescriptor, EnclosedValueDescriptor>();
|
||||
public JetDelegatorToSuperCall superCall;
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ public abstract class StackValue {
|
||||
}
|
||||
|
||||
private static class None extends StackValue {
|
||||
public static None INSTANCE = new None();
|
||||
public static final None INSTANCE = new None();
|
||||
|
||||
private None() {
|
||||
super(Type.VOID_TYPE);
|
||||
@@ -554,7 +554,7 @@ public abstract class StackValue {
|
||||
}
|
||||
|
||||
private static class Invert extends StackValue {
|
||||
private StackValue myOperand;
|
||||
private final StackValue myOperand;
|
||||
|
||||
private Invert(StackValue operand) {
|
||||
super(Type.BOOLEAN_TYPE);
|
||||
@@ -586,7 +586,7 @@ public abstract class StackValue {
|
||||
}
|
||||
|
||||
private static class ArrayElement extends StackValue {
|
||||
private Type boxed;
|
||||
private final Type boxed;
|
||||
|
||||
public ArrayElement(Type type, boolean unbox) {
|
||||
super(type);
|
||||
@@ -1147,8 +1147,8 @@ public abstract class StackValue {
|
||||
}
|
||||
|
||||
private static class ThisOuter extends StackValue {
|
||||
private ExpressionCodegen codegen;
|
||||
private ClassDescriptor descriptor;
|
||||
private final ExpressionCodegen codegen;
|
||||
private final ClassDescriptor descriptor;
|
||||
|
||||
public ThisOuter(ExpressionCodegen codegen, ClassDescriptor descriptor) {
|
||||
super(TYPE_OBJECT);
|
||||
@@ -1164,8 +1164,8 @@ public abstract class StackValue {
|
||||
}
|
||||
|
||||
private static class PostIncrement extends StackValue {
|
||||
private int index;
|
||||
private int increment;
|
||||
private final int index;
|
||||
private final int increment;
|
||||
|
||||
public PostIncrement(int index, int increment) {
|
||||
super(Type.INT_TYPE);
|
||||
@@ -1184,8 +1184,8 @@ public abstract class StackValue {
|
||||
}
|
||||
|
||||
private static class PreIncrement extends StackValue {
|
||||
private int index;
|
||||
private int increment;
|
||||
private final int index;
|
||||
private final int increment;
|
||||
|
||||
public PreIncrement(int index, int increment) {
|
||||
super(Type.INT_TYPE);
|
||||
@@ -1204,10 +1204,10 @@ public abstract class StackValue {
|
||||
}
|
||||
|
||||
public static class CallReceiver extends StackValue {
|
||||
private ResolvedCall<? extends CallableDescriptor> resolvedCall;
|
||||
StackValue receiver;
|
||||
private ExpressionCodegen codegen;
|
||||
private CallableMethod callableMethod;
|
||||
private final ResolvedCall<? extends CallableDescriptor> resolvedCall;
|
||||
final StackValue receiver;
|
||||
private final ExpressionCodegen codegen;
|
||||
private final CallableMethod callableMethod;
|
||||
|
||||
public CallReceiver(
|
||||
ResolvedCall<? extends CallableDescriptor> resolvedCall,
|
||||
|
||||
@@ -75,7 +75,7 @@ public class BothSignatureWriter {
|
||||
private String kotlinClassParameters;
|
||||
private String kotlinClassSignature;
|
||||
|
||||
private List<JvmMethodParameterSignature> kotlinParameterTypes = new ArrayList<JvmMethodParameterSignature>();
|
||||
private final List<JvmMethodParameterSignature> kotlinParameterTypes = new ArrayList<JvmMethodParameterSignature>();
|
||||
private String kotlinReturnType;
|
||||
|
||||
private int jvmCurrentTypeArrayLevel;
|
||||
@@ -104,7 +104,7 @@ public class BothSignatureWriter {
|
||||
}
|
||||
|
||||
// TODO: ignore when debugging is disabled
|
||||
private Stack<SignatureVisitor> visitors = new Stack<SignatureVisitor>();
|
||||
private final Stack<SignatureVisitor> visitors = new Stack<SignatureVisitor>();
|
||||
|
||||
private void push(SignatureVisitor visitor) {
|
||||
visitors.push(visitor);
|
||||
|
||||
@@ -17,29 +17,30 @@
|
||||
|
||||
package org.jetbrains.jet.di;
|
||||
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import java.util.List;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.codegen.JetTypeMapper;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.codegen.BuiltinToJavaTypesMapping;
|
||||
import org.jetbrains.jet.codegen.ClassBuilderMode;
|
||||
import org.jetbrains.jet.codegen.ClosureAnnotator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.codegen.JetTypeMapper;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.util.List;
|
||||
|
||||
/* This file is generated by org.jetbrains.jet.di.AllInjectorsGenerator. DO NOT EDIT! */
|
||||
public class InjectorForJetTypeMapper {
|
||||
|
||||
private final BindingContext bindingContext;
|
||||
private final List<JetFile> listOfJetFile;
|
||||
private JetTypeMapper jetTypeMapper;
|
||||
private BuiltinToJavaTypesMapping builtinToJavaTypesMapping;
|
||||
private ClassBuilderMode classBuilderMode;
|
||||
private ClosureAnnotator closureAnnotator;
|
||||
private final JetTypeMapper jetTypeMapper;
|
||||
private final BuiltinToJavaTypesMapping builtinToJavaTypesMapping;
|
||||
private final ClassBuilderMode classBuilderMode;
|
||||
private final ClosureAnnotator closureAnnotator;
|
||||
|
||||
public InjectorForJetTypeMapper(
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull List<JetFile> listOfJetFile
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull List<JetFile> listOfJetFile
|
||||
) {
|
||||
this.bindingContext = bindingContext;
|
||||
this.listOfJetFile = listOfJetFile;
|
||||
@@ -57,7 +58,6 @@ public class InjectorForJetTypeMapper {
|
||||
closureAnnotator.setFiles(listOfJetFile);
|
||||
|
||||
jetTypeMapper.init();
|
||||
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
@@ -67,5 +67,4 @@ public class InjectorForJetTypeMapper {
|
||||
public JetTypeMapper getJetTypeMapper() {
|
||||
return this.jetTypeMapper;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,22 +17,14 @@
|
||||
|
||||
package org.jetbrains.jet.di;
|
||||
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import java.util.List;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.codegen.BuiltinToJavaTypesMapping;
|
||||
import org.jetbrains.jet.codegen.ClassBuilderMode;
|
||||
import org.jetbrains.jet.codegen.GenerationState;
|
||||
import org.jetbrains.jet.codegen.ClassBuilderFactory;
|
||||
import org.jetbrains.jet.codegen.JetTypeMapper;
|
||||
import org.jetbrains.jet.codegen.ClassCodegen;
|
||||
import org.jetbrains.jet.codegen.ScriptCodegen;
|
||||
import org.jetbrains.jet.codegen.intrinsics.IntrinsicMethods;
|
||||
import org.jetbrains.jet.codegen.ClassFileFactory;
|
||||
import org.jetbrains.jet.codegen.MemberCodegen;
|
||||
import org.jetbrains.jet.codegen.ClosureAnnotator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.codegen.*;
|
||||
import org.jetbrains.jet.codegen.intrinsics.IntrinsicMethods;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.util.List;
|
||||
|
||||
/* This file is generated by org.jetbrains.jet.di.AllInjectorsGenerator. DO NOT EDIT! */
|
||||
public class InjectorForJvmCodegen {
|
||||
@@ -43,21 +35,21 @@ public class InjectorForJvmCodegen {
|
||||
private final ClassBuilderMode classBuilderMode;
|
||||
private final GenerationState generationState;
|
||||
private final ClassBuilderFactory classBuilderFactory;
|
||||
private JetTypeMapper jetTypeMapper;
|
||||
private ClassCodegen classCodegen;
|
||||
private ScriptCodegen scriptCodegen;
|
||||
private IntrinsicMethods intrinsics;
|
||||
private ClassFileFactory classFileFactory;
|
||||
private MemberCodegen memberCodegen;
|
||||
private ClosureAnnotator closureAnnotator;
|
||||
private final JetTypeMapper jetTypeMapper;
|
||||
private final ClassCodegen classCodegen;
|
||||
private final ScriptCodegen scriptCodegen;
|
||||
private final IntrinsicMethods intrinsics;
|
||||
private final ClassFileFactory classFileFactory;
|
||||
private final MemberCodegen memberCodegen;
|
||||
private final ClosureAnnotator closureAnnotator;
|
||||
|
||||
public InjectorForJvmCodegen(
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull List<JetFile> listOfJetFile,
|
||||
@NotNull BuiltinToJavaTypesMapping builtinToJavaTypesMapping,
|
||||
@NotNull ClassBuilderMode classBuilderMode,
|
||||
@NotNull GenerationState generationState,
|
||||
@NotNull ClassBuilderFactory classBuilderFactory
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull List<JetFile> listOfJetFile,
|
||||
@NotNull BuiltinToJavaTypesMapping builtinToJavaTypesMapping,
|
||||
@NotNull ClassBuilderMode classBuilderMode,
|
||||
@NotNull GenerationState generationState,
|
||||
@NotNull ClassBuilderFactory classBuilderFactory
|
||||
) {
|
||||
this.bindingContext = bindingContext;
|
||||
this.listOfJetFile = listOfJetFile;
|
||||
@@ -99,7 +91,6 @@ public class InjectorForJvmCodegen {
|
||||
jetTypeMapper.init();
|
||||
|
||||
intrinsics.init();
|
||||
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
@@ -137,5 +128,4 @@ public class InjectorForJvmCodegen {
|
||||
public ClosureAnnotator getClosureAnnotator() {
|
||||
return this.closureAnnotator;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user