Skip to content

Commit

Permalink
helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrimatti committed Dec 29, 2023
1 parent a46f466 commit 05ce714
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/fi/solita/utils/meta/Helpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,13 @@ public boolean accept(Element candidate) {
return candidate.getModifiers().contains(Modifier.PRIVATE);
}
};

public static final Predicate<Element> staticElement = new Predicate<Element>() {
@Override
public boolean accept(Element candidate) {
return candidate.getModifiers().contains(Modifier.STATIC);
}
};

public static final boolean isPrivate(Element e) {
return e.getModifiers().contains(Modifier.PRIVATE);
Expand All @@ -469,7 +476,7 @@ public static final boolean isPrivate(Element e) {
public static final boolean isFinal(Element e) {
return e.getModifiers().contains(Modifier.FINAL);
}

public static final boolean returnsVoid(ExecutableElement method) {
return method.getReturnType().getKind() == TypeKind.VOID;
}
Expand Down

0 comments on commit 05ce714

Please sign in to comment.