Skip to content

Commit

Permalink
add HasAnnotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Liyw979 committed Oct 13, 2024
1 parent a43bb48 commit cc5b981
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package sootup.java.core;

public interface HasAnnotation {
Iterable<AnnotationUsage> getAnnotations();
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import sootup.core.types.Type;
import sootup.java.core.types.JavaClassType;

public class JavaSootClass extends SootClass {
public class JavaSootClass extends SootClass implements HasAnnotation {

public JavaSootClass(JavaSootClassSource classSource, SourceType sourceType) {
super(classSource, sourceType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import sootup.core.model.SootField;
import sootup.core.signatures.FieldSignature;

public class JavaSootField extends SootField {
public class JavaSootField extends SootField implements HasAnnotation {

@Nonnull private final Iterable<AnnotationUsage> annotations;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import sootup.core.signatures.MethodSignature;
import sootup.core.types.ClassType;

public class JavaSootMethod extends SootMethod {
public class JavaSootMethod extends SootMethod implements HasAnnotation {
@Nonnull private final Iterable<AnnotationUsage> annotations;

public JavaSootMethod(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
import sootup.core.jimple.basic.Local;
import sootup.core.types.Type;
import sootup.java.core.AnnotationUsage;
import sootup.java.core.HasAnnotation;

public class JavaLocal extends Local {
public class JavaLocal extends Local implements HasAnnotation {

// TODO: [ms] add to JavaJimple
// TODO: [ms] make use of this class in both Java Frontends
Expand Down

0 comments on commit cc5b981

Please sign in to comment.