mbeckerle commented on a change in pull request #326: Daffodil 2280 cleanup -
removes backpointers and factory patterns no longer needed
URL: https://github.com/apache/incubator-daffodil/pull/326#discussion_r394610056
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/ComplexTypes.scala
##########
@@ -84,29 +87,16 @@ sealed abstract class ComplexTypeBase(xmlArg: Node,
parentArg: SchemaComponent)
}
}
-final class GlobalComplexTypeDefFactory(xmlArg: Node, schemaDocumentArg:
SchemaDocument)
- extends SchemaComponentFactory(xmlArg, schemaDocumentArg)
- with GlobalNonElementComponentMixin {
-
- def forElement(elementDecl: ElementDeclMixin) = new
GlobalComplexTypeDef(xml, schemaDocument, elementDecl, this)
-
- override lazy val namedQName = QName.createGlobal(name, targetNamespace,
xml.scope)
-
-}
-
/**
* For unit testing purposes, the element argument might be supplied as null.
*/
final class GlobalComplexTypeDef(
xmlArg: Node,
- schemaDocumentArg: SchemaDocument,
- val elementDecl: ElementDeclMixin,
- override val factory: GlobalComplexTypeDefFactory)
+ schemaDocumentArg: SchemaDocument)
extends ComplexTypeBase(xmlArg, schemaDocumentArg)
with GlobalNonElementComponentMixin
- with NestingTraversesToReferenceMixin {
-
- override lazy val referringComponent = Option(elementDecl)
+ with NestingLexicalMixin {
+ // nothing here
Review comment:
will do. It's because the base classes/traits are providing all the
necessary functionality. There is a local mixin in one class, and a global
mixin in the other, but otherwise these two classes are pretty much the same,
and the base class provides everything.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services