Class LazyFilteredAnnotationDB

    • Constructor Detail

      • LazyFilteredAnnotationDB

        public LazyFilteredAnnotationDB​(String name,
                                        AnnotationDB source,
                                        AnnotationType schema)
        Create a new DB by wrapping another with a schema.
        Parameters:
        name - the name for the SB
        source - the underlying DB
        schema - the schema to apply to the underlying DB to make this one
    • Method Detail

      • getSchema

        public AnnotationType getSchema()
        Description copied from interface: AnnotationDB

        Get an AnnotationType that accepts all Annotation instances in this DB.

        The schema should accept all Annotations in the DB. However, it may hit other Annotations. So, AnnotationType.ALL is always a valid schema. Obviously, the more retrictive it is, the more usefull it becomes for introspection.

        Specified by:
        getSchema in interface AnnotationDB
        Returns:
        the schema AnnotationType
      • size

        public int size()
        Description copied from interface: AnnotationDB
        The number of Annotation instances in the DB.
        Specified by:
        size in interface AnnotationDB
        Returns:
        the size of this DB
      • filter

        public AnnotationDB filter​(AnnotationType at)
        Description copied from interface: AnnotationDB
        Find all Annotation instances in this DB that are of a particular type.
        Specified by:
        filter in interface AnnotationDB
        Parameters:
        at - the AnnotationType to match
        Returns:
        an AnnotationDB with all matching Annotation instances
      • search

        public AnnotationDB search​(AnnotationType at)
        Description copied from interface: AnnotationDB
        Find all Annotation instances in this DB and any Annotations that are child properties of these that match an AnnotationType.
        Specified by:
        search in interface AnnotationDB
        Parameters:
        at - the AnnotationType to search with
        Returns:
        an AnnotationDB with all matching Annotation instances, irregardless of how deep in the hieracy they are