Package org.hibernate.models.internal
Class AnnotationTargetHelper
java.lang.Object
org.hibernate.models.internal.AnnotationTargetHelper
Utilities related to AnnotationTarget
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringdetermineContainingPackageName(ClassDetails classDetails) static <T> TfromContainers(AnnotationTarget annotationTarget, boolean crossPackageBoundaries, ModelsContext modelContext, Function<ClassDetails, T> matchingExtractor) static <T> TfromSelfAndContainers(AnnotationTarget self, boolean crossPackageBoundaries, ModelsContext modelContext, Function<AnnotationTarget, T> matchingExtractor) static ClassDetailsresolvePackageInfo(ClassDetails classDetails, ModelsContext modelsContext) Resolve the ClassDetails descriptor for the package which contains the givenclassDetails.static voidwalkContainers(AnnotationTarget annotationTarget, boolean crossPackageBoundaries, ModelsContext modelContext, Consumer<ClassDetails> consumer) static voidwalkSelfAndContainers(AnnotationTarget self, boolean crossPackageBoundaries, ModelsContext modelContext, Consumer<AnnotationTarget> consumer)
-
Method Details
-
resolvePackageInfo
public static ClassDetails resolvePackageInfo(ClassDetails classDetails, ModelsContext modelsContext) Resolve the ClassDetails descriptor for the package which contains the givenclassDetails.- API Note:
classDetailsmay be the ClassDetails for a `package-info` itself, in which case this returns the `package-info` ClassDetails for the containing package.
-
determineContainingPackageName
-
walkContainers
public static void walkContainers(AnnotationTarget annotationTarget, boolean crossPackageBoundaries, ModelsContext modelContext, Consumer<ClassDetails> consumer) -
walkSelfAndContainers
public static void walkSelfAndContainers(AnnotationTarget self, boolean crossPackageBoundaries, ModelsContext modelContext, Consumer<AnnotationTarget> consumer) -
fromContainers
public static <T> T fromContainers(AnnotationTarget annotationTarget, boolean crossPackageBoundaries, ModelsContext modelContext, Function<ClassDetails, T> matchingExtractor) -
fromSelfAndContainers
public static <T> T fromSelfAndContainers(AnnotationTarget self, boolean crossPackageBoundaries, ModelsContext modelContext, Function<AnnotationTarget, T> matchingExtractor)
-