Class DeclarativeUtils

java.lang.Object
io.helidon.declarative.codegen.DeclarativeUtils

public class DeclarativeUtils extends Object
Utilities of Declarative code generators.
  • Method Details

    • findMetaAnnotated

      public static Optional<Annotation> findMetaAnnotated(Collection<Annotation> annotations, TypeName metaAnnotation)
      Find an annotation that is of the provided type, even it is a meta annotation of one of the annotations present.
      Parameters:
      annotations - set of annotations on the element
      metaAnnotation - type of the meta annotation we are looking for
      Returns:
      the meta annotation instance, or empty optional if not found
    • combinePaths

      public static String combinePaths(String first, String second)
      Combine paths ensuring a single "/" between the two paths.
      Parameters:
      first - fist path, with possible trailing slash
      second - second path with possible leading slash
      Returns:
      combined result with slash