NamespaceCodegen extends GenerationStateAware
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.codegen;
|
||||
|
||||
/**
|
||||
* @author Stepan Koltsov
|
||||
*/
|
||||
public enum MapTypeMode {
|
||||
/**
|
||||
* foo.Bar is mapped to Lfoo/Bar;
|
||||
*/
|
||||
IMPL,
|
||||
/**
|
||||
* foo.Bar is mapped to Lfoo/Bar$TImpl;
|
||||
*/
|
||||
TRAIT_IMPL,
|
||||
/**
|
||||
* jet.Int is mapped to I
|
||||
*/
|
||||
VALUE,
|
||||
/**
|
||||
* jet.Int is mapped to Ljava/lang/Integer;
|
||||
*/
|
||||
TYPE_PARAMETER,
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import org.jetbrains.asm4.commons.InstructionAdapter;
|
||||
import org.jetbrains.jet.codegen.binding.CodegenBinding;
|
||||
import org.jetbrains.jet.codegen.context.CodegenContext;
|
||||
import org.jetbrains.jet.codegen.state.GenerationState;
|
||||
import org.jetbrains.jet.codegen.state.GenerationStateAware;
|
||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.PropertyDescriptor;
|
||||
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
|
||||
@@ -46,11 +47,10 @@ import static org.jetbrains.asm4.Opcodes.*;
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class NamespaceCodegen {
|
||||
public class NamespaceCodegen extends GenerationStateAware {
|
||||
@NotNull
|
||||
private final ClassBuilderOnDemand v;
|
||||
@NotNull private final FqName name;
|
||||
private final GenerationState state;
|
||||
private final Collection<JetFile> files;
|
||||
|
||||
public NamespaceCodegen(
|
||||
@@ -59,11 +59,11 @@ public class NamespaceCodegen {
|
||||
GenerationState state,
|
||||
Collection<JetFile> namespaceFiles
|
||||
) {
|
||||
super(state);
|
||||
checkAllFilesHaveSameNamespace(namespaceFiles);
|
||||
|
||||
this.v = v;
|
||||
name = fqName;
|
||||
this.state = state;
|
||||
this.files = namespaceFiles;
|
||||
|
||||
final PsiFile sourceFile = namespaceFiles.iterator().next().getContainingFile();
|
||||
|
||||
Reference in New Issue
Block a user