Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: pkg/dartdoc/mirrors/mirrors.dart

Issue 10919260: Reorganize dartdoc to new package layout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/dartdoc/mirrors/dart2js_mirror.dart ('k') | pkg/dartdoc/mirrors/mirrors_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/mirrors/mirrors.dart
diff --git a/pkg/dartdoc/mirrors/mirrors.dart b/pkg/dartdoc/mirrors/mirrors.dart
deleted file mode 100644
index 786e9b9eadf4b30f62ff2c5e555b28e4804a4140..0000000000000000000000000000000000000000
--- a/pkg/dartdoc/mirrors/mirrors.dart
+++ /dev/null
@@ -1,468 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#library('mirrors');
-
-#import('dart:io');
-#import('dart:uri');
-#import('dart2js_mirror.dart');
-
-/**
- * [Compilation] encapsulates the compilation of a program.
- */
-class Compilation {
- /**
- * Creates a new compilation which has [script] as its entry point.
- */
- factory Compilation(Path script,
- Path libraryRoot,
- [Path packageRoot,
- List<String> opts = const <String>[]]) {
- return new Dart2JsCompilation(script, libraryRoot, packageRoot, opts);
- }
-
- /**
- * Creates a new compilation which consists of a set of libraries, but which
- * has no entry point. This compilation cannot generate output but can only
- * be used for static inspection of the source code.
- */
- factory Compilation.library(List<Path> libraries,
- Path libraryRoot,
- [Path packageRoot,
- List<String> opts = const []]) {
- return new Dart2JsCompilation.library(libraries, libraryRoot,
- packageRoot, opts);
- }
-
- /**
- * Returns the mirror system for this compilation.
- */
- final MirrorSystem mirrors;
-
- /**
- * Returns a future for the compiled JavaScript code.
- */
- abstract Future<String> compileToJavaScript();
-}
-
-/**
- * The main interface for the whole mirror system.
- */
-abstract class MirrorSystem {
- /**
- * Returns an unmodifiable map of all libraries in this mirror system.
- */
- Map<Object, LibraryMirror> get libraries;
-}
-
-
-/**
- * An entity in the mirror system.
- */
-abstract class Mirror implements Hashable {
- /**
- * The simple name of the entity. The simple name is in most cases the
- * the declared single identifier name of the entity, such as 'method' for
- * a method [:void method() {...}:].
- */
- String get simpleName;
-
- /**
- * Returns the name of this entity qualified by is enclosing context. For
- * instance, the qualified name of a method 'method' in class 'Class' in
- * library 'library' is 'library.Class.method'.
- */
- String get qualifiedName;
-
- /**
- * Returns the mirror system which contains this mirror.
- */
- MirrorSystem get system;
-}
-
-/**
- * Common interface for interface types and libraries.
- */
-abstract class ObjectMirror implements Mirror {
-
- /**
- * Returns an unmodifiable map of the members of declared in this type or
- * library.
- */
- Map<Object, MemberMirror> get declaredMembers;
-}
-
-/**
- * A library.
- */
-abstract class LibraryMirror extends ObjectMirror {
- /**
- * The name of the library, as given in #library().
- */
- String get simpleName;
-
- /**
- * Returns an iterable over all types in the library.
- */
- Map<Object, InterfaceMirror> get types;
-
- /**
- * Returns the source location for this library.
- */
- Location get location;
-}
-
-/**
- * Common interface for classes, interfaces, typedefs and type variables.
- */
-abstract class TypeMirror implements Mirror {
- /**
- * Returns the source location for this type.
- */
- Location get location;
-
- /**
- * Returns the library in which this member resides.
- */
- LibraryMirror get library;
-
- /**
- * Is [:true:] iff this type is the [:Object:] type.
- */
- bool get isObject;
-
- /**
- * Is [:true:] iff this type is the [:Dynamic:] type.
- */
- bool get isDynamic;
-
- /**
- * Is [:true:] iff this type is the void type.
- */
- bool get isVoid;
-
- /**
- * Is [:true:] iff this type is a type variable.
- */
- bool get isTypeVariable;
-
- /**
- * Is [:true:] iff this type is a typedef.
- */
- bool get isTypedef;
-
- /**
- * Is [:true:] iff this type is a function type.
- */
- bool get isFunction;
-}
-
-/**
- * A class or interface type.
- */
-abstract class InterfaceMirror implements TypeMirror, ObjectMirror {
- /**
- * Returns the defining type, i.e. declaration of a type.
- */
- InterfaceMirror get declaration;
-
- /**
- * Returns the super class of this type, or null if this type is [Object] or a
- * typedef.
- */
- InterfaceMirror get superclass;
-
- /**
- * Returns an iterable over the interfaces directly implemented by this type.
- */
- Map<Object, InterfaceMirror> get interfaces;
-
- /**
- * Is [:true:] iff this type is a class.
- */
- bool get isClass;
-
- /**
- * Is [:true:] iff this type is an interface.
- */
- bool get isInterface;
-
- /**
- * Is [:true:] if this type is private.
- */
- bool get isPrivate;
-
- /**
- * Is [:true:] if this type is the declaration of a type.
- */
- bool get isDeclaration;
-
- /**
- * Returns a list of the type arguments for this type.
- */
- List<TypeMirror> get typeArguments;
-
- /**
- * Returns the list of type variables for this type.
- */
- List<TypeVariableMirror> get typeVariables;
-
- /**
- * Returns an immutable map of the constructors in this interface.
- */
- Map<Object, MethodMirror> get constructors;
-
- /**
- * Returns the default type for this interface.
- */
- InterfaceMirror get defaultType;
-}
-
-/**
- * A type parameter as declared on a generic type.
- */
-abstract class TypeVariableMirror implements TypeMirror {
- /**
- * Return a mirror on the class, interface, or typedef that declared the
- * type variable.
- */
- // Should not be called [declaration] as we then would have two [TypeMirror]
- // subtypes ([InterfaceMirror] and [TypeVariableMirror]) which have
- // [declaration()] methods but with different semantics.
- InterfaceMirror get declarer;
-
- /**
- * Returns the bound of the type parameter.
- */
- TypeMirror get bound;
-}
-
-/**
- * A function type.
- */
-abstract class FunctionTypeMirror implements InterfaceMirror {
- /**
- * Returns the return type of this function type.
- */
- TypeMirror get returnType;
-
- /**
- * Returns the parameters for this function type.
- */
- List<ParameterMirror> get parameters;
-
- /**
- * Returns the call method for this function type.
- */
- MethodMirror get callMethod;
-}
-
-/**
- * A typedef.
- */
-abstract class TypedefMirror implements InterfaceMirror {
- /**
- * Returns the defining type for this typedef. For instance [:void f(int):]
- * for a [:typedef void f(int):].
- */
- TypeMirror get definition;
-}
-
-/**
- * A member of a type, i.e. a field, method or constructor.
- */
-abstract class MemberMirror implements Mirror {
- /**
- * Returns the source location for this member.
- */
- Location get location;
-
- /**
- * Returns a mirror on the declaration immediately surrounding the reflectee.
- * This could be a class, interface, library or another method or function.
- */
- ObjectMirror get surroundingDeclaration;
-
- /**
- * Returns true if this is a top level member, i.e. a member not within a
- * type.
- */
- bool get isTopLevel;
-
- /**
- * Returns true if this member is a constructor.
- */
- bool get isConstructor;
-
- /**
- * Returns true if this member is a field.
- */
- bool get isField;
-
- /**
- * Returns true if this member is a method.
- */
- bool get isMethod;
-
- /**
- * Returns true if this member is private.
- */
- bool get isPrivate;
-
- /**
- * Returns true if this member is static.
- */
- bool get isStatic;
-}
-
-/**
- * A field.
- */
-abstract class FieldMirror implements MemberMirror {
-
- /**
- * Returns true if this field is final.
- */
- bool get isFinal;
-
- /**
- * Returns the type of this field.
- */
- TypeMirror get type;
-}
-
-/**
- * Common interface constructors and methods, including factories, getters and
- * setters.
- */
-abstract class MethodMirror implements MemberMirror {
- /**
- * Returns the list of parameters for this method.
- */
- List<ParameterMirror> get parameters;
-
- /**
- * Returns the return type of this method.
- */
- TypeMirror get returnType;
-
- /**
- * Is [:true:] if this method is a constant constructor.
- */
- bool get isConst;
-
- /**
- * Is [:true:] if this method is a factory method.
- */
- bool get isFactory;
-
- /**
- * Returns the constructor name for named constructors and factory methods,
- * e.g. [:'bar':] for constructor [:Foo.bar:] of type [:Foo:].
- */
- String get constructorName;
-
- /**
- * Is [:true:] if this method is a getter method.
- */
- bool get isGetter;
-
- /**
- * Is [:true:] if this method is a setter method.
- */
- bool get isSetter;
-
- /**
- * Is [:true:] if this method is an operator method.
- */
- bool get isOperator;
-
- /**
- * Returns the operator name for operator methods, e.g. [:'<':] for
- * [:operator <:]
- */
- String get operatorName;
-}
-
-/**
- * A formal parameter.
- */
-abstract class ParameterMirror implements Mirror {
- /**
- * Returns the type of this parameter.
- */
- TypeMirror get type;
-
- /**
- * Returns the default value for this parameter.
- */
- String get defaultValue;
-
- /**
- * Returns true if this parameter has a default value.
- */
- bool get hasDefaultValue;
-
- /**
- * Returns true if this parameter is optional.
- */
- bool get isOptional;
-
- /**
- * Returns [:true:] iff this parameter is an initializing formal of a
- * constructor. That is, if it is of the form [:this.x:] where [:x:] is a
- * field.
- */
- bool get isInitializingFormal;
-
- /**
- * Returns the initialized field, if this parameter is an initializing formal.
- */
- FieldMirror get initializedField;
-}
-
-/**
- * A [Location] describes the span of an entity in Dart source code.
- * A [Location] should be the minimum span that encloses the declaration of the
- * mirrored entity.
- */
-abstract class Location {
- /**
- * The character position where the location begins.
- */
- int get start;
-
- /**
- * The character position where the location ends.
- */
- int get end;
-
- /**
- * Returns the [Source] in which this [Location] indexes.
- * If [:loc:] is a location, [:loc.source().text()[loc.start()] is where it
- * starts, and [:loc.source().text()[loc.end()] is where it ends.
- */
- Source get source;
-
- /**
- * The text of the location span.
- */
- String get text;
-}
-
-/**
- * A [Source] describes the source code of a compilation unit in Dart source
- * code.
- */
-abstract class Source {
- /**
- * Returns the URI where the source originated.
- */
- Uri get uri;
-
- /**
- * Returns the text of this source.
- */
- String get text;
-}
« no previous file with comments | « pkg/dartdoc/mirrors/dart2js_mirror.dart ('k') | pkg/dartdoc/mirrors/mirrors_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698