All Downloads are FREE. Search and download functionalities are using the official Maven repository.

miksilo.modularLanguages.deltas.classes.ClassDelta.scala Maven / Gradle / Ivy

The newest version!
package miksilo.modularLanguages.deltas.classes

import miksilo.modularLanguages.core.node.{NodeField, NodeLike, NodeShape}
import miksilo.modularLanguages.deltas.HasNameDelta.HasName

object ClassDelta {

  object Shape extends NodeShape

  object Members extends NodeField

  object ClassImports extends NodeField

  object ClassParent extends NodeField

  object ClassPackage extends NodeField

  implicit class JavaClass[T <: NodeLike](val node: T) extends HasName[T] {
    def _package: Seq[String] = node(ClassPackage).asInstanceOf[Seq[String]]
    def _package_=(value: Seq[String]): Unit = node(ClassPackage) = value

    def imports = node(ClassImports).asInstanceOf[Seq[T]]
    def imports_=(value: Seq[T]): Unit = node(ClassImports) = value

    def members = node(Members).asInstanceOf[Seq[T]]
    def members_=(value: Seq[T]): Unit = node(Members) = value

    def parent: Option[String] = node.getValue(ClassParent).asInstanceOf[Option[String]]
    def parent_=(value: Option[String]): Unit = node(ClassParent) = value
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy