Initial version of storing SourceElements in descriptors
Introduce SourceElement, JavaSourceElementFactory, DeclarationDescriptorWithSource Implement getSource() for eager, lazy and java descriptors
This commit is contained in:
+10
-6
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.FunctionDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.Annotations;
|
||||
import org.jetbrains.jet.lang.descriptors.impl.ConstructorDescriptorImpl;
|
||||
|
||||
@@ -33,18 +34,20 @@ public class JavaConstructorDescriptor extends ConstructorDescriptorImpl impleme
|
||||
@Nullable JavaConstructorDescriptor original,
|
||||
@NotNull Annotations annotations,
|
||||
boolean isPrimary,
|
||||
@NotNull Kind kind
|
||||
@NotNull Kind kind,
|
||||
@NotNull SourceElement source
|
||||
) {
|
||||
super(containingDeclaration, original, annotations, isPrimary, kind);
|
||||
super(containingDeclaration, original, annotations, isPrimary, kind, source);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static JavaConstructorDescriptor createJavaConstructor(
|
||||
@NotNull ClassDescriptor containingDeclaration,
|
||||
@NotNull Annotations annotations,
|
||||
boolean isPrimary
|
||||
boolean isPrimary,
|
||||
@NotNull SourceElement source
|
||||
) {
|
||||
return new JavaConstructorDescriptor(containingDeclaration, null, annotations, isPrimary, Kind.DECLARATION);
|
||||
return new JavaConstructorDescriptor(containingDeclaration, null, annotations, isPrimary, Kind.DECLARATION, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,8 +83,9 @@ public class JavaConstructorDescriptor extends ConstructorDescriptorImpl impleme
|
||||
"newOwner: " + newOwner + "\n" +
|
||||
"kind: " + kind);
|
||||
}
|
||||
JavaConstructorDescriptor result =
|
||||
new JavaConstructorDescriptor((ClassDescriptor) newOwner, this, Annotations.EMPTY /* TODO */, isPrimary, kind);
|
||||
JavaConstructorDescriptor result = new JavaConstructorDescriptor(
|
||||
(ClassDescriptor) newOwner, this, Annotations.EMPTY /* TODO */, isPrimary, kind, SourceElement.NO_SOURCE
|
||||
);
|
||||
result.setHasStableParameterNames(hasStableParameterNames());
|
||||
result.setHasSynthesizedParameterNames(hasSynthesizedParameterNames());
|
||||
return result;
|
||||
|
||||
+9
-5
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.FunctionDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.SimpleFunctionDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.Annotations;
|
||||
import org.jetbrains.jet.lang.descriptors.impl.FunctionDescriptorImpl;
|
||||
import org.jetbrains.jet.lang.descriptors.impl.SimpleFunctionDescriptorImpl;
|
||||
@@ -35,18 +36,20 @@ public class JavaMethodDescriptor extends SimpleFunctionDescriptorImpl implement
|
||||
@Nullable SimpleFunctionDescriptor original,
|
||||
@NotNull Annotations annotations,
|
||||
@NotNull Name name,
|
||||
@NotNull Kind kind
|
||||
@NotNull Kind kind,
|
||||
@NotNull SourceElement source
|
||||
) {
|
||||
super(containingDeclaration, original, annotations, name, kind);
|
||||
super(containingDeclaration, original, annotations, name, kind, source);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static JavaMethodDescriptor createJavaMethod(
|
||||
@NotNull DeclarationDescriptor containingDeclaration,
|
||||
@NotNull Annotations annotations,
|
||||
@NotNull Name name
|
||||
@NotNull Name name,
|
||||
@NotNull SourceElement source
|
||||
) {
|
||||
return new JavaMethodDescriptor(containingDeclaration, null, annotations, name, Kind.DECLARATION);
|
||||
return new JavaMethodDescriptor(containingDeclaration, null, annotations, name, Kind.DECLARATION, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,7 +84,8 @@ public class JavaMethodDescriptor extends SimpleFunctionDescriptorImpl implement
|
||||
(SimpleFunctionDescriptor) original,
|
||||
getAnnotations(),
|
||||
getName(),
|
||||
kind
|
||||
kind,
|
||||
SourceElement.NO_SOURCE
|
||||
);
|
||||
result.setHasStableParameterNames(hasStableParameterNames());
|
||||
result.setHasSynthesizedParameterNames(hasSynthesizedParameterNames());
|
||||
|
||||
+4
-2
@@ -19,6 +19,7 @@ package org.jetbrains.jet.lang.resolve.java.descriptor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.Modality;
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement;
|
||||
import org.jetbrains.jet.lang.descriptors.Visibility;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.Annotations;
|
||||
import org.jetbrains.jet.lang.descriptors.impl.PropertyDescriptorImpl;
|
||||
@@ -30,9 +31,10 @@ public class JavaPropertyDescriptor extends PropertyDescriptorImpl implements Ja
|
||||
@NotNull Annotations annotations,
|
||||
@NotNull Visibility visibility,
|
||||
boolean isVar,
|
||||
@NotNull Name name
|
||||
@NotNull Name name,
|
||||
@NotNull SourceElement source
|
||||
) {
|
||||
super(containingDeclaration, null, annotations, Modality.FINAL, visibility, isVar, name, Kind.DECLARATION);
|
||||
super(containingDeclaration, null, annotations, Modality.FINAL, visibility, isVar, name, Kind.DECLARATION, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
* Copyright 2010-2014 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.
|
||||
@@ -18,6 +18,7 @@ package org.jetbrains.jet.lang.resolve.java.descriptor;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassOrPackageFragmentDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement;
|
||||
import org.jetbrains.jet.lang.descriptors.SynthesizedCallableMemberDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.impl.SimpleFunctionDescriptorImpl;
|
||||
|
||||
@@ -29,7 +30,8 @@ public class SamConstructorDescriptor extends SimpleFunctionDescriptorImpl
|
||||
@NotNull ClassOrPackageFragmentDescriptor containingDeclaration,
|
||||
@NotNull JavaClassDescriptor samInterface
|
||||
) {
|
||||
super(containingDeclaration, null, samInterface.getAnnotations(), samInterface.getName(), Kind.SYNTHESIZED);
|
||||
super(containingDeclaration, null, samInterface.getAnnotations(), samInterface.getName(),
|
||||
Kind.SYNTHESIZED, samInterface.getSource());
|
||||
this.samInterface = samInterface;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -46,7 +46,8 @@ public class LazyJavaPackageFragmentProvider(
|
||||
outerContext.errorReporter,
|
||||
outerContext.methodSignatureChecker,
|
||||
outerContext.javaResolverCache,
|
||||
outerContext.javaPropertyInitializerEvaluator
|
||||
outerContext.javaPropertyInitializerEvaluator,
|
||||
outerContext.sourceElementFactory
|
||||
)
|
||||
|
||||
override fun getModule() = _module
|
||||
|
||||
+11
-5
@@ -29,6 +29,7 @@ import org.jetbrains.jet.lang.resolve.java.resolver.JavaResolverCache
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.DeserializedDescriptorResolver
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.KotlinClassFinder
|
||||
import org.jetbrains.jet.lang.resolve.java.structure.JavaPropertyInitializerEvaluator
|
||||
import org.jetbrains.jet.lang.resolve.java.sources.JavaSourceElementFactory
|
||||
|
||||
open class GlobalJavaResolverContext(
|
||||
val storageManager: StorageManager,
|
||||
@@ -40,7 +41,8 @@ open class GlobalJavaResolverContext(
|
||||
val errorReporter: ErrorReporter,
|
||||
val methodSignatureChecker: MethodSignatureChecker,
|
||||
val javaResolverCache: JavaResolverCache,
|
||||
val javaPropertyInitializerEvaluator: JavaPropertyInitializerEvaluator
|
||||
val javaPropertyInitializerEvaluator: JavaPropertyInitializerEvaluator,
|
||||
val sourceElementFactory: JavaSourceElementFactory
|
||||
)
|
||||
|
||||
open class LazyJavaResolverContext(
|
||||
@@ -55,10 +57,12 @@ open class LazyJavaResolverContext(
|
||||
errorReporter: ErrorReporter,
|
||||
methodSignatureChecker: MethodSignatureChecker,
|
||||
javaResolverCache: JavaResolverCache,
|
||||
javaPropertyInitializerEvaluator: JavaPropertyInitializerEvaluator
|
||||
javaPropertyInitializerEvaluator: JavaPropertyInitializerEvaluator,
|
||||
sourceElementFactory: JavaSourceElementFactory
|
||||
) : GlobalJavaResolverContext(storageManager, finder, kotlinClassFinder, deserializedDescriptorResolver,
|
||||
externalAnnotationResolver, externalSignatureResolver,
|
||||
errorReporter, methodSignatureChecker, javaResolverCache, javaPropertyInitializerEvaluator)
|
||||
errorReporter, methodSignatureChecker, javaResolverCache, javaPropertyInitializerEvaluator,
|
||||
sourceElementFactory)
|
||||
|
||||
fun LazyJavaResolverContext.withTypes(
|
||||
typeParameterResolver: TypeParameterResolver = TypeParameterResolver.EMPTY
|
||||
@@ -75,6 +79,7 @@ fun LazyJavaResolverContext.withTypes(
|
||||
methodSignatureChecker,
|
||||
javaResolverCache,
|
||||
javaPropertyInitializerEvaluator,
|
||||
sourceElementFactory,
|
||||
LazyJavaTypeResolver(this, typeParameterResolver),
|
||||
typeParameterResolver)
|
||||
|
||||
@@ -91,12 +96,13 @@ class LazyJavaResolverContextWithTypes(
|
||||
methodSignatureChecker: MethodSignatureChecker,
|
||||
javaResolverCache: JavaResolverCache,
|
||||
javaPropertyInitializerEvaluator: JavaPropertyInitializerEvaluator,
|
||||
sourceElementFactory: JavaSourceElementFactory,
|
||||
val typeResolver: LazyJavaTypeResolver,
|
||||
val typeParameterResolver: TypeParameterResolver
|
||||
) : LazyJavaResolverContext(packageFragmentProvider, javaClassResolver, storageManager, finder,
|
||||
kotlinClassFinder, deserializedDescriptorResolver,
|
||||
externalAnnotationResolver, externalSignatureResolver,
|
||||
errorReporter, methodSignatureChecker, javaResolverCache, javaPropertyInitializerEvaluator)
|
||||
externalAnnotationResolver, externalSignatureResolver, errorReporter, methodSignatureChecker,
|
||||
javaResolverCache, javaPropertyInitializerEvaluator, sourceElementFactory)
|
||||
|
||||
fun LazyJavaResolverContextWithTypes.child(
|
||||
containingDeclaration: DeclarationDescriptor,
|
||||
|
||||
+3
-1
@@ -49,13 +49,15 @@ import org.jetbrains.jet.lang.resolve.java.descriptor.JavaClassStaticsPackageFra
|
||||
import org.jetbrains.jet.lang.types.AbstractClassTypeConstructor
|
||||
import org.jetbrains.jet.lang.resolve.java.lazy.resolveTopLevelClassInModule
|
||||
import org.jetbrains.jet.lang.descriptors.impl.EnumClassObjectDescriptor
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement
|
||||
|
||||
class LazyJavaClassDescriptor(
|
||||
private val outerC: LazyJavaResolverContextWithTypes,
|
||||
containingDeclaration: DeclarationDescriptor,
|
||||
internal val fqName: FqName,
|
||||
private val jClass: JavaClass
|
||||
) : ClassDescriptorBase(outerC.storageManager, containingDeclaration, fqName.shortName()), LazyJavaDescriptor, JavaClassDescriptor {
|
||||
) : ClassDescriptorBase(outerC.storageManager, containingDeclaration, fqName.shortName(),
|
||||
outerC.sourceElementFactory.source(jClass)), LazyJavaDescriptor, JavaClassDescriptor {
|
||||
|
||||
private val c: LazyJavaResolverContextWithTypes = outerC.child(this, jClass.getTypeParameters().toSet());
|
||||
|
||||
|
||||
+9
-4
@@ -114,7 +114,9 @@ public class LazyJavaClassMemberScope(
|
||||
}
|
||||
|
||||
private fun resolveConstructor(constructor: JavaMethod, classDescriptor: ClassDescriptor, isStaticClass: Boolean): JavaConstructorDescriptor {
|
||||
val constructorDescriptor = JavaConstructorDescriptor.createJavaConstructor(classDescriptor, Annotations.EMPTY, /* isPrimary = */ false)
|
||||
val constructorDescriptor = JavaConstructorDescriptor.createJavaConstructor(
|
||||
classDescriptor, Annotations.EMPTY, /* isPrimary = */ false, c.sourceElementFactory.source(constructor)
|
||||
)
|
||||
|
||||
val valueParameters = resolveValueParameters(c, constructorDescriptor, constructor.getValueParameters())
|
||||
val effectiveSignature = c.externalSignatureResolver.resolveAlternativeMethodSignature(
|
||||
@@ -147,7 +149,9 @@ public class LazyJavaClassMemberScope(
|
||||
return null
|
||||
|
||||
val classDescriptor = getContainingDeclaration()
|
||||
val constructorDescriptor = JavaConstructorDescriptor.createJavaConstructor(classDescriptor, Annotations.EMPTY, /* isPrimary = */ true)
|
||||
val constructorDescriptor = JavaConstructorDescriptor.createJavaConstructor(
|
||||
classDescriptor, Annotations.EMPTY, /* isPrimary = */ true, c.sourceElementFactory.source(jClass)
|
||||
)
|
||||
val typeParameters = classDescriptor.getTypeConstructor().getParameters()
|
||||
val valueParameters = if (isAnnotation) createAnnotationConstructorParameters(constructorDescriptor)
|
||||
else Collections.emptyList<ValueParameterDescriptor>()
|
||||
@@ -198,7 +202,8 @@ public class LazyJavaClassMemberScope(
|
||||
TypeUtils.makeNotNullable(returnType),
|
||||
method.hasAnnotationParameterDefaultValue(),
|
||||
// Nulls are not allowed in annotation arguments in Java
|
||||
varargElementType?.let { TypeUtils.makeNotNullable(it) }
|
||||
varargElementType?.let { TypeUtils.makeNotNullable(it) },
|
||||
SourceElement.NO_SOURCE
|
||||
))
|
||||
}
|
||||
|
||||
@@ -222,7 +227,7 @@ public class LazyJavaClassMemberScope(
|
||||
EnumEntrySyntheticClassDescriptor.create(c.storageManager, getContainingDeclaration(), name,
|
||||
c.storageManager.createLazyValue {
|
||||
memberIndex().getAllFieldNames() + memberIndex().getAllMethodNames()
|
||||
})
|
||||
}, SourceElement.NO_SOURCE)
|
||||
}
|
||||
else null
|
||||
}
|
||||
|
||||
+7
-3
@@ -112,7 +112,9 @@ public abstract class LazyJavaMemberScope(
|
||||
|
||||
fun resolveMethodToFunctionDescriptor(method: JavaMethod, record: Boolean = true): JavaMethodDescriptor {
|
||||
|
||||
val functionDescriptorImpl = JavaMethodDescriptor.createJavaMethod(_containingDeclaration, c.resolveAnnotations(method), method.getName())
|
||||
val functionDescriptorImpl = JavaMethodDescriptor.createJavaMethod(
|
||||
_containingDeclaration, c.resolveAnnotations(method), method.getName(), c.sourceElementFactory.source(method)
|
||||
)
|
||||
|
||||
val c = c.child(functionDescriptorImpl, method.getTypeParameters().toSet())
|
||||
|
||||
@@ -210,7 +212,8 @@ public abstract class LazyJavaMemberScope(
|
||||
name,
|
||||
outType,
|
||||
false,
|
||||
varargElementType
|
||||
varargElementType,
|
||||
SourceElement.NO_SOURCE
|
||||
)
|
||||
}.toList()
|
||||
return ResolvedValueParameters(descriptors, synthesizedNames)
|
||||
@@ -273,7 +276,8 @@ public abstract class LazyJavaMemberScope(
|
||||
val annotations = c.resolveAnnotations(field)
|
||||
val propertyName = field.getName()
|
||||
|
||||
return JavaPropertyDescriptor(_containingDeclaration, annotations, visibility, isVar, propertyName)
|
||||
return JavaPropertyDescriptor(_containingDeclaration, annotations, visibility, isVar, propertyName,
|
||||
c.sourceElementFactory.source(field))
|
||||
}
|
||||
|
||||
private fun getPropertyType(field: JavaField): JetType {
|
||||
|
||||
+3
-1
@@ -25,6 +25,7 @@ import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns
|
||||
import org.jetbrains.jet.lang.resolve.java.resolver.TypeUsage
|
||||
import org.jetbrains.jet.lang.resolve.java.lazy.LazyJavaResolverContextWithTypes
|
||||
import org.jetbrains.jet.lang.resolve.java.lazy.types.toAttributes
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement
|
||||
|
||||
class LazyJavaTypeParameterDescriptor(
|
||||
private val c: LazyJavaResolverContextWithTypes,
|
||||
@@ -36,7 +37,8 @@ class LazyJavaTypeParameterDescriptor(
|
||||
javaTypeParameter.getName(),
|
||||
Variance.INVARIANT,
|
||||
/* isReified = */ false,
|
||||
javaTypeParameter.getIndex()
|
||||
javaTypeParameter.getIndex(),
|
||||
SourceElement.NO_SOURCE
|
||||
) {
|
||||
|
||||
override fun resolveUpperBounds(): Set<JetType> {
|
||||
|
||||
+3
-1
@@ -245,7 +245,9 @@ public final class DescriptorResolverUtils {
|
||||
typeParameter.isReified(),
|
||||
typeParameter.getVariance(),
|
||||
typeParameter.getName(),
|
||||
typeParameter.getIndex()));
|
||||
typeParameter.getIndex(),
|
||||
SourceElement.NO_SOURCE)
|
||||
);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+3
-1
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.jet.lang.resolve.java.sam;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement;
|
||||
import org.jetbrains.jet.lang.resolve.java.descriptor.JavaConstructorDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.java.descriptor.SamAdapterDescriptor;
|
||||
|
||||
@@ -24,7 +25,8 @@ import org.jetbrains.jet.lang.resolve.java.descriptor.SamAdapterDescriptor;
|
||||
private final JavaConstructorDescriptor declaration;
|
||||
|
||||
public SamAdapterConstructorDescriptor(@NotNull JavaConstructorDescriptor declaration) {
|
||||
super(declaration.getContainingDeclaration(), null, declaration.getAnnotations(), declaration.isPrimary(), Kind.SYNTHESIZED);
|
||||
super(declaration.getContainingDeclaration(), null, declaration.getAnnotations(),
|
||||
declaration.isPrimary(), Kind.SYNTHESIZED, declaration.getSource());
|
||||
this.declaration = declaration;
|
||||
setHasStableParameterNames(declaration.hasStableParameterNames());
|
||||
setHasSynthesizedParameterNames(declaration.hasSynthesizedParameterNames());
|
||||
|
||||
+3
-1
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.jet.lang.resolve.java.sam;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement;
|
||||
import org.jetbrains.jet.lang.resolve.java.descriptor.JavaMethodDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.java.descriptor.SamAdapterDescriptor;
|
||||
|
||||
@@ -24,7 +25,8 @@ import org.jetbrains.jet.lang.resolve.java.descriptor.SamAdapterDescriptor;
|
||||
private final JavaMethodDescriptor declaration;
|
||||
|
||||
public SamAdapterFunctionDescriptor(@NotNull JavaMethodDescriptor declaration) {
|
||||
super(declaration.getContainingDeclaration(), null, declaration.getAnnotations(), declaration.getName(), Kind.SYNTHESIZED);
|
||||
super(declaration.getContainingDeclaration(), null, declaration.getAnnotations(),
|
||||
declaration.getName(), Kind.SYNTHESIZED, declaration.getSource());
|
||||
this.declaration = declaration;
|
||||
setHasStableParameterNames(declaration.hasStableParameterNames());
|
||||
setHasSynthesizedParameterNames(declaration.hasSynthesizedParameterNames());
|
||||
|
||||
+4
-2
@@ -145,7 +145,7 @@ public class SingleAbstractMethodUtils {
|
||||
assert parameterType != null : "couldn't substitute type: " + parameterTypeUnsubstituted +
|
||||
", substitutor = " + typeParameters.substitutor;
|
||||
ValueParameterDescriptor parameter = new ValueParameterDescriptorImpl(
|
||||
result, null, 0, Annotations.EMPTY, Name.identifier("function"), parameterType, false, null);
|
||||
result, null, 0, Annotations.EMPTY, Name.identifier("function"), parameterType, false, null, SourceElement.NO_SOURCE);
|
||||
|
||||
JetType returnType = typeParameters.substitutor.substitute(samInterface.getDefaultType(), Variance.OUT_VARIANCE);
|
||||
assert returnType != null : "couldn't substitute type: " + samInterface.getDefaultType() +
|
||||
@@ -249,7 +249,9 @@ public class SingleAbstractMethodUtils {
|
||||
assert newType != null : "couldn't substitute type: " + newTypeUnsubstituted + ", substitutor = " + typeParameters.substitutor;
|
||||
|
||||
ValueParameterDescriptor newParam = new ValueParameterDescriptorImpl(
|
||||
adapter, null, originalParam.getIndex(), originalParam.getAnnotations(), originalParam.getName(), newType, false, null);
|
||||
adapter, null, originalParam.getIndex(), originalParam.getAnnotations(),
|
||||
originalParam.getName(), newType, false, null, SourceElement.NO_SOURCE
|
||||
);
|
||||
valueParameters.add(newParam);
|
||||
}
|
||||
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2010-2014 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.lang.resolve.java.sources
|
||||
|
||||
import org.jetbrains.jet.lang.resolve.java.structure.JavaElement
|
||||
import org.jetbrains.jet.lang.descriptors.SourceElement
|
||||
|
||||
trait JavaSourceElementFactory {
|
||||
fun source(javaElement: JavaElement): SourceElement
|
||||
}
|
||||
Reference in New Issue
Block a user