[FE] Add flag to java model to distinguish source java classes from binaries
This commit is contained in:
committed by
teamcity
parent
09ff6303cc
commit
26df9d74e8
+5
@@ -41,6 +41,11 @@ public abstract class JavaClassifierImpl<Psi extends PsiClass> extends JavaEleme
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFromSource() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<JavaAnnotation> getAnnotations() {
|
||||
|
||||
+5
@@ -51,6 +51,11 @@ public abstract class JavaMemberImpl<Psi extends PsiMember> extends JavaElementI
|
||||
return Name.identifier(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFromSource() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JavaClass getContainingClass() {
|
||||
|
||||
+5
@@ -58,6 +58,11 @@ public class JavaValueParameterImpl extends JavaElementImpl<PsiParameter>
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFromSource() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Visibility getVisibility() {
|
||||
|
||||
+2
@@ -45,6 +45,8 @@ class BinaryJavaClass(
|
||||
override lateinit var typeParameters: List<JavaTypeParameter>
|
||||
override lateinit var supertypes: List<JavaClassifierType>
|
||||
|
||||
override val isFromSource: Boolean get() = false
|
||||
|
||||
override val methods = arrayListOf<JavaMethod>()
|
||||
override val fields = arrayListOf<JavaField>()
|
||||
override val constructors = arrayListOf<JavaConstructor>()
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ abstract class BinaryJavaMethodBase(
|
||||
) : JavaMember, BinaryJavaModifierListOwner, MutableJavaAnnotationOwner {
|
||||
override val annotations: MutableCollection<JavaAnnotation> = SmartList()
|
||||
override val annotationsByFqName by buildLazyValueForMap()
|
||||
override val isFromSource: Boolean get() = false
|
||||
|
||||
companion object {
|
||||
private class MethodInfo(
|
||||
|
||||
+8
@@ -33,6 +33,7 @@ class BinaryJavaField(
|
||||
) : JavaField, BinaryJavaModifierListOwner, MutableJavaAnnotationOwner {
|
||||
override val annotations: MutableCollection<JavaAnnotation> = SmartList()
|
||||
override val annotationsByFqName by buildLazyValueForMap()
|
||||
override val isFromSource: Boolean get() = false
|
||||
|
||||
override val hasConstantNotNullInitializer: Boolean
|
||||
get() = initializerValue != null
|
||||
@@ -46,6 +47,8 @@ class BinaryJavaTypeParameter(
|
||||
) : JavaTypeParameter, ListBasedJavaAnnotationOwner, MutableJavaAnnotationOwner {
|
||||
override val annotations: MutableCollection<JavaAnnotation> = SmartList()
|
||||
override val isDeprecatedInJavaDoc = false
|
||||
override val isFromSource: Boolean
|
||||
get() = false
|
||||
}
|
||||
|
||||
class BinaryJavaValueParameter(
|
||||
@@ -57,6 +60,9 @@ class BinaryJavaValueParameter(
|
||||
|
||||
override var name: Name? = null
|
||||
|
||||
override val isFromSource: Boolean
|
||||
get() = false
|
||||
|
||||
internal fun updateName(newName: Name) {
|
||||
assert(name == null) { "Parameter can't have two names: $name and $newName" }
|
||||
name = newName
|
||||
@@ -69,6 +75,8 @@ class BinaryJavaRecordComponent(
|
||||
override val type: JavaType,
|
||||
override val isVararg: Boolean,
|
||||
) : JavaRecordComponent, BinaryJavaModifierListOwner {
|
||||
override val isFromSource: Boolean get() = false
|
||||
|
||||
override val annotations: Collection<JavaAnnotation>
|
||||
get() = emptyList()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user