Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Helps finding classes or methods with specific annotations.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
LICENSE
pubspec.lock
pubspec.yaml
readme.md

readme.md

Annotation Crawler

Build Status

Helps finding annotated declarations in a particular scope.

Usage

    import "annotation_crawler";

    main () {

      //perform all plays written by Arthur miller
      annotatedDeclarations(Author)
          .where((decl) => decl.declaration is ClassMirror && decl.annotation == const Author("Arthur Miller"))
          .map((decl) => decl.declaration.newInstance(const Symbol(""), ["Her majesty's Theater"]).reflectee)
          .forEach(perform);

      //Perform the first scence of ACT III of the Merchant of Venice
      var play = annotatedDeclarations(Title)
        .where((decl) => decl.annotation.name = "The Merchant of venice")
        .single.newInstance(const Symbol(""), ["Her majesty's theater"]);

      MethodMirror scene = annotatedDeclarations(Scene, on: play.runtimeType)
      .where((decl) => decl.annotation.act == "III" &&
                      decl.annotation.scene == "I")
      .single;

      perform(play.getField(scene.simpleName).reflectee); 

    }
Something went wrong with that request. Please try again.