Skip to content

Commit

Permalink
Revert "Make hierarchy in KSP API sealed"
Browse files Browse the repository at this point in the history
This reverts commit 98666a8.
  • Loading branch information
ting-yuan committed Oct 25, 2023
1 parent 145eb96 commit fb283ff
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions api/api.base
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ package com.google.devtools.ksp.processing {
property @NonNull public abstract String targetName;
}

public sealed interface PlatformInfo {
public interface PlatformInfo {
method @NonNull public String getPlatformName();
property @NonNull public abstract String platformName;
}
Expand Down Expand Up @@ -262,7 +262,7 @@ package com.google.devtools.ksp.symbol {
enum_constant public static final com.google.devtools.ksp.symbol.FunctionKind TOP_LEVEL;
}

public sealed interface KSAnnotated extends com.google.devtools.ksp.symbol.KSNode {
public interface KSAnnotated extends com.google.devtools.ksp.symbol.KSNode {
method @NonNull public kotlin.sequences.Sequence<com.google.devtools.ksp.symbol.KSAnnotation> getAnnotations();
property @NonNull public abstract kotlin.sequences.Sequence<com.google.devtools.ksp.symbol.KSAnnotation> annotations;
}
Expand Down Expand Up @@ -313,7 +313,7 @@ package com.google.devtools.ksp.symbol {
property @Nullable public abstract com.google.devtools.ksp.symbol.KSClassifierReference qualifier;
}

public sealed interface KSDeclaration extends com.google.devtools.ksp.symbol.KSModifierListOwner com.google.devtools.ksp.symbol.KSAnnotated com.google.devtools.ksp.symbol.KSExpectActual {
public interface KSDeclaration extends com.google.devtools.ksp.symbol.KSModifierListOwner com.google.devtools.ksp.symbol.KSAnnotated com.google.devtools.ksp.symbol.KSExpectActual {
method @Nullable public com.google.devtools.ksp.symbol.KSFile getContainingFile();
method @Nullable public String getDocString();
method @NonNull public com.google.devtools.ksp.symbol.KSName getPackageName();
Expand All @@ -330,7 +330,7 @@ package com.google.devtools.ksp.symbol {
property @NonNull public abstract java.util.List<com.google.devtools.ksp.symbol.KSTypeParameter> typeParameters;
}

public sealed interface KSDeclarationContainer extends com.google.devtools.ksp.symbol.KSNode {
public interface KSDeclarationContainer extends com.google.devtools.ksp.symbol.KSNode {
method @NonNull public kotlin.sequences.Sequence<com.google.devtools.ksp.symbol.KSDeclaration> getDeclarations();
property @NonNull public abstract kotlin.sequences.Sequence<com.google.devtools.ksp.symbol.KSDeclaration> declarations;
}
Expand Down Expand Up @@ -390,7 +390,7 @@ package com.google.devtools.ksp.symbol {
property @Nullable public abstract com.google.devtools.ksp.symbol.KSTypeReference returnType;
}

public sealed interface KSModifierListOwner extends com.google.devtools.ksp.symbol.KSNode {
public interface KSModifierListOwner extends com.google.devtools.ksp.symbol.KSNode {
method @NonNull public java.util.Set<com.google.devtools.ksp.symbol.Modifier> getModifiers();
property @NonNull public abstract java.util.Set<com.google.devtools.ksp.symbol.Modifier> modifiers;
}
Expand All @@ -416,7 +416,7 @@ package com.google.devtools.ksp.symbol {
property @NonNull public abstract com.google.devtools.ksp.symbol.KSReferenceElement element;
}

public sealed interface KSPropertyAccessor extends com.google.devtools.ksp.symbol.KSDeclarationContainer com.google.devtools.ksp.symbol.KSAnnotated com.google.devtools.ksp.symbol.KSModifierListOwner {
public interface KSPropertyAccessor extends com.google.devtools.ksp.symbol.KSDeclarationContainer com.google.devtools.ksp.symbol.KSAnnotated com.google.devtools.ksp.symbol.KSModifierListOwner {
method @NonNull public com.google.devtools.ksp.symbol.KSPropertyDeclaration getReceiver();
property @NonNull public abstract com.google.devtools.ksp.symbol.KSPropertyDeclaration receiver;
}
Expand Down Expand Up @@ -449,7 +449,7 @@ package com.google.devtools.ksp.symbol {
property @NonNull public abstract com.google.devtools.ksp.symbol.KSValueParameter parameter;
}

public sealed interface KSReferenceElement extends com.google.devtools.ksp.symbol.KSNode {
public interface KSReferenceElement extends com.google.devtools.ksp.symbol.KSNode {
method @NonNull public java.util.List<com.google.devtools.ksp.symbol.KSTypeArgument> getTypeArguments();
property @NonNull public abstract java.util.List<com.google.devtools.ksp.symbol.KSTypeArgument> typeArguments;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package com.google.devtools.ksp.processing
/**
* Platform specific information
*/
sealed interface PlatformInfo {
interface PlatformInfo {
val platformName: String
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.google.devtools.ksp.symbol
/**
* A symbol that can be annotated with annotations.
*/
sealed interface KSAnnotated : KSNode {
interface KSAnnotated : KSNode {

/**
* All annotations on this symbol.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.google.devtools.ksp.symbol
/**
* A declaration, can be function declaration, class declaration and property declaration, or a type alias.
*/
sealed interface KSDeclaration : KSModifierListOwner, KSAnnotated, KSExpectActual {
interface KSDeclaration : KSModifierListOwner, KSAnnotated, KSExpectActual {
/**
* Simple name of this declaration, usually the name identifier at the declaration site.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.google.devtools.ksp.symbol
/**
* A declaration container can have a list of declarations declared in it.
*/
sealed interface KSDeclarationContainer : KSNode {
interface KSDeclarationContainer : KSNode {
/**
* Declarations that are lexically declared inside the current container.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.google.devtools.ksp.symbol
/**
* A [KSModifierListOwner] can have zero or more modifiers.
*/
sealed interface KSModifierListOwner : KSNode {
interface KSModifierListOwner : KSNode {
/**
* The set of modifiers on this element.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package com.google.devtools.ksp.symbol
* Note that annotation use-site targets such as @get: @set: is not copied to accessor's annotations attribute.
* Use KSAnnotated.findAnnotationFromUseSiteTarget() to ensure annotations from parent is obtained.
*/
sealed interface KSPropertyAccessor : KSDeclarationContainer, KSAnnotated, KSModifierListOwner {
interface KSPropertyAccessor : KSDeclarationContainer, KSAnnotated, KSModifierListOwner {
/**
* The owner of the property accessor.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package com.google.devtools.ksp.symbol
*
* KSReferenceElement can specify, for example, a class, interface, or function, etc.
*/
sealed interface KSReferenceElement : KSNode {
interface KSReferenceElement : KSNode {
/**
* Type arguments in the type reference.
*/
Expand Down

0 comments on commit fb283ff

Please sign in to comment.