summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/doc/model/Entity.scala
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-06-18 13:19:42 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2012-06-18 13:19:42 +0200
commit6167ec678e8fceaacc51e6d8c496ebbc8c8485af (patch)
tree1f4605837ba3309a9cad18eaba49d1a628b41791 /src/compiler/scala/tools/nsc/doc/model/Entity.scala
parent55348f7a44f1ac52232bcceedce8d0e9c036f8d8 (diff)
downloadscala-6167ec678e8fceaacc51e6d8c496ebbc8c8485af.tar.gz
scala-6167ec678e8fceaacc51e6d8c496ebbc8c8485af.tar.bz2
scala-6167ec678e8fceaacc51e6d8c496ebbc8c8485af.zip
Revert "Scaladoc class diagrams part 1"
This reverts commit 831f09bb6d00c152bd8aef3ce8bf9e200080fe36.
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/model/Entity.scala')
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/Entity.scala96
1 files changed, 15 insertions, 81 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/Entity.scala b/src/compiler/scala/tools/nsc/doc/model/Entity.scala
index 5d1413abd4..6488847049 100644
--- a/src/compiler/scala/tools/nsc/doc/model/Entity.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/Entity.scala
@@ -10,7 +10,7 @@ package model
import scala.collection._
import comment._
-import diagram._
+
/** An entity in a Scaladoc universe. Entities are declarations in the program and correspond to symbols in the
* compiler. Entities model the following Scala concepts:
@@ -86,20 +86,9 @@ trait TemplateEntity extends Entity {
/** Whether this template is a case class. */
def isCaseClass: Boolean
- /** The type of this entity, with type members */
- def ownType: TypeEntity
-
/** The self-type of this template, if it differs from the template type. */
def selfType : Option[TypeEntity]
- /** The full template name `[kind] qualifiedName` */
- def fullName =
- (if (isPackage) "package "
- else if (isCaseClass) "case class "
- else if (isClass) "class "
- else if (isTrait) "trait "
- else if (isObject) "object "
- else "") + qualifiedName
}
@@ -178,12 +167,8 @@ trait MemberEntity extends Entity {
/** Whether this member is abstract. */
def isAbstract: Boolean
- /** If this symbol is a use case, the useCaseOf will contain the member it was derived from, containing the full
- * signature and the complete parameter descriptions. */
- def useCaseOf: Option[MemberEntity] = None
-
/** If this member originates from an implicit conversion, we set the implicit information to the correct origin */
- def byConversion: Option[ImplicitConversionInfo]
+ def byConversion: Option[ImplicitConversion]
}
object MemberEntity {
// Oh contravariance, contravariance, wherefore art thou contravariance?
@@ -221,10 +206,8 @@ trait DocTemplateEntity extends TemplateEntity with MemberEntity {
* only if the `docsourceurl` setting has been set. */
def sourceUrl: Option[java.net.URL]
- /** The direct super-type of this template
- e.g: {{{class A extends B[C[Int]] with D[E]}}} will have two direct parents: class B and D
- NOTE: we are dropping the refinement here! */
- def parentTypes: List[(TemplateEntity, TypeEntity)]
+ /** The direct super-type of this template. */
+ def parentType: Option[TypeEntity]
@deprecated("Use `linearizationTemplates` and `linearizationTypes` instead", "2.9.0")
def linearization: List[(TemplateEntity, TypeEntity)]
@@ -237,13 +220,9 @@ trait DocTemplateEntity extends TemplateEntity with MemberEntity {
* This template's linearization contains all of its direct and indirect super-types. */
def linearizationTypes: List[TypeEntity]
- /** All class, trait and object templates for which this template is a direct or indirect super-class or super-trait.
- * Only templates for which documentation is available in the universe (`DocTemplateEntity`) are listed. */
- def allSubClasses: List[DocTemplateEntity]
-
- /** All class, trait and object templates for which this template is a *direct* super-class or super-trait.
- * Only templates for which documentation is available in the universe (`DocTemplateEntity`) are listed. */
- def directSubClasses: List[DocTemplateEntity]
+ /**All class, trait and object templates for which this template is a direct or indirect super-class or super-trait.
+ * Only templates for which documentation is available in the universe (`DocTemplateEntity`) are listed. */
+ def subClasses: List[DocTemplateEntity]
/** All members of this template. If this template is a package, only templates for which documentation is available
* in the universe (`DocTemplateEntity`) are listed. */
@@ -271,19 +250,6 @@ trait DocTemplateEntity extends TemplateEntity with MemberEntity {
/** The implicit conversions this template (class or trait, objects and packages are not affected) */
def conversions: List[ImplicitConversion]
-
- /** Classes that can be implcitly converted to this class */
- def incomingImplicitlyConvertedClasses: List[DocTemplateEntity]
-
- /** Classes to which this class can be implicitly converted to
- NOTE: Some classes might not be included in the scaladoc run so they will be NoDocTemplateEntities */
- def outgoingImplicitlyConvertedClasses: List[(TemplateEntity, TypeEntity)]
-
- /** If this template takes place in inheritance and implicit conversion relations, it will be shown in this diagram */
- def inheritanceDiagram: Option[Diagram]
-
- /** If this template contains other templates, such as classes and traits, they will be shown in this diagram */
- def contentDiagram: Option[Diagram]
}
@@ -339,6 +305,10 @@ trait NonTemplateMemberEntity extends MemberEntity {
* It corresponds to a real member, and provides a simplified, yet compatible signature for that member. */
def isUseCase: Boolean
+ /** If this symbol is a use case, the useCaseOf will contain the member it was derived from, containing the full
+ * signature and the complete parameter descriptions. */
+ def useCaseOf: Option[MemberEntity]
+
/** Whether this member is a bridge member. A bridge member does only exist for binary compatibility reasons
* and should not appear in ScalaDoc. */
def isBridge: Boolean
@@ -457,15 +427,6 @@ trait ImplicitConversion {
/** The result type after the conversion */
def targetType: TypeEntity
- /** The result type after the conversion
- * Note: not all targetTypes have a corresponding template. Examples include conversions resulting in refinement
- * types. Need to check it's not option!
- */
- def targetTemplate: Option[TemplateEntity]
-
- /** The components of the implicit conversion type parents */
- def targetTypeComponents: List[(TemplateEntity, TypeEntity)]
-
/** The entity for the method that performed the conversion, if it's documented (or just its name, otherwise) */
def convertorMethod: Either[MemberEntity, String]
@@ -485,38 +446,11 @@ trait ImplicitConversion {
def members: List[MemberEntity]
}
-trait ImplicitConversionInfo {
- /** The implicit conversion this member originates from */
- def conversion: ImplicitConversion
-
- /** The shadowing information for this member */
- def shadowing: ImplicitMemberShadowing
-
- /* Quick getters */
- def isShadowed: Boolean = !shadowing.shadowingMembers.isEmpty
- def isAmbiguous: Boolean = !shadowing.ambiguatingMembers.isEmpty
-}
-
-/** Shadowing captures the information that the member is shadowed by some other members
- * There are two cases of implicitly added member shadowing:
- * 1) shadowing from a original class member (the class already has that member)
- * in this case, it won't be possible to call the member directly, the type checker will fail attempting to adapt
- * the call arguments (or if they fit it will call the original class' method)
- * 2) shadowing from other possible implicit conversions ()
- * this will result in an ambiguous implicit converion error
- */
-trait ImplicitMemberShadowing {
- /** The members that shadow the current entry use .inTemplate to get to the template name */
- def shadowingMembers: List[MemberEntity]
-
- /** The members that ambiguate this implicit conversion
- Note: for ambiguatingMembers you have the following invariant:
- assert(ambiguatingMembers.foreach(_.byConversion.isDefined) */
- def ambiguatingMembers: List[MemberEntity]
-}
-
/** A trait that encapsulates a constraint necessary for implicit conversion */
-trait Constraint
+trait Constraint {
+ // /** The implicit conversion during which this constraint appears */
+ // def conversion: ImplicitConversion
+}
/** A constraint involving a type parameter which must be in scope */
trait ImplicitInScopeConstraint extends Constraint {