Skip to content

Commit

Permalink
Add XTypeElements#isJvmClass.
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 526751572
  • Loading branch information
wanyingd1996 authored and Dagger Team committed Apr 24, 2023
1 parent 03d89fc commit 89d615c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions java/dagger/internal/codegen/xprocessing/XTypeElements.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ public static boolean isEffectivelyPrivate(XTypeElement element) {
return allVisibilities(element).contains(Visibility.PRIVATE);
}

public static boolean isJvmClass(XTypeElement element) {
return element.isClass() || element.isKotlinObject() || element.isCompanionObject();
}

/**
* Returns a list of visibilities containing visibility of the given element and the visibility of
* its enclosing elements.
Expand Down

0 comments on commit 89d615c

Please sign in to comment.