mirrorme 0.2.2

  • readme.md
  • Installing
  • Versions
  • 29

Mirror me

A mirrors helper library for the dart language.


This is how you can scrap the metadata info from an object.

MetaDataHelper<MetaData, MethodMirror> mirrorHelper = new MetaDataHelper<MetaData, MethodMirror>();
List<MetaDataValue<MetaData>> mirrorModels = mirrorHelper.from(new Anno());

The annotated class.

class Anno {

  void test() {}

MetaDataValue has the following fields:

Symbol memberName;
InstanceMirror instanceMirror;
T object;

Search for classes that implement or extend for example the class Anno.

ClassSearcher<Anno> searcher = new ClassSearcher<Anno>();
List<Anno> searchResult = searcher.scan();

Notes to Contributors

Fork Mirrorme

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

If you are new to Git or GitHub, please read this guide first.

For usage see Dart Force

Realtime web framework for dart that uses forcemvc & mirrorme & wired source code


This file contains highlights of what changes on each version of the forcemvc package.

Pub version 0.2.2

renaming to mirrorme

Pub version 0.2.1+1 - 0.2.1+5

add a method on MetadataValue to get the return type typeOfOwner

Pub version 0.2.1

extends the MetaDataHelper with method fromMirror, so we can look at it without instantiating it.

Pub version 0.2.0

add iml to gitignore Rename AnnotationChecker to AnnotationScanner Scan All libraries instead of just RootLibrary Add Documentation

Pub version 0.1.11

Change logic of annotation_checker and class_scanner to reduce size.

Pub version 0.1.10+3

Skip dart core libraries to scan for annotations.

Pub version 0.1.10 & 0.1.10+1 & 0.1.10+2

Add method 'getOtherMetadata' in the class 'MetaDataValue'.

Pub version 0.1.9

Extend MetaDataHelper so it can search for methods and variables.

Pub version 0.1.8

Adding name to get the string name out of the mirrors in the class 'MetaDataValue'.

Pub version 0.1.8

Adding functionality to check if a annotation is available on a class.

Pub version 0.1.7

Provide methodMirror in MetaDataValue and added a property to access parameters.

Pub version 0.1.6+2

Adding dev dependencies for unittests.

Pub version 0.1.6+1

Creating the correct instance of the correct class in class searcher.

Pub version 0.1.6

Adding a way to search for class that implements or extends a certain class with mirror operations.

Pub version 0.1.5

Solving a bug in metadata helpers to return a value.

Pub version 0.1.5

Adding a class scanner to get a list of all classes with a certain annotation.

Pub version 0.1.4 & 0.1.4+1

Adding invoke method to force metadata value.

Pub version 0.1.3 & 0.1.3+1

Adding some minor changes.

Pub version 0.1.2+1

Adding tests for mirrorhelpers and classes for annotation handling.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  mirrorme: "^0.2.2"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:mirrorme/mirrorme.dart';
Version Uploaded Documentation Archive
0.2.2 Jan 8, 2015 Go to the documentation of mirrorme 0.2.2 Download mirrorme 0.2.2 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
2 / 100
Code health derived from static analysis. [more]
94 / 100
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: web, other

Primary library: package:mirrorme/mirrorme.dart with components: mirrors.


  • Package is too old.

    The package was released more than two years ago.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 7 hints.

    Run dartfmt to format lib/helpers/annotation_checker.dart.

    Run dartfmt to format lib/helpers/class_scanner.dart.

    Similar analysis of the following files failed:

    • lib/helpers/class_searcher.dart (hint)
    • lib/helpers/metadata_helpers.dart (hint)
    • lib/helpers/metadata_value.dart (hint)
    • lib/mirrorme.dart (hint)
  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use mirrorme.dart.


Package Constraint Resolved Available
Dev dependencies
unittest >=0.9.0 <0.9.1