Class

org.bitlap.tools.macros.elapsedMacro

ElapsedProcessor

Related Doc: package elapsedMacro

Permalink

class ElapsedProcessor extends AbstractMacroProcessor

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ElapsedProcessor
  2. AbstractMacroProcessor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ElapsedProcessor(c: Context)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final lazy val SDKClasses: Set[String]

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractMacroProcessor
  5. def appendClassBody(classDecl: scala.reflect.macros.Universe.ClassDef, classInfoAction: (ClassDefinition) ⇒ List[scala.reflect.macros.Universe.Tree]): scala.reflect.macros.Universe.ClassDef

    Permalink

    Generate the specified syntax tree and assign it to the tree definition itself.

    Generate the specified syntax tree and assign it to the tree definition itself. Used only when you modify the definition of the class itself. Such as add method/add field.

    classInfoAction

    Content body added in class definition

    returns

    Return a new scala.reflect.api.Trees#ClassDef

    Definition Classes
    AbstractMacroProcessor
  6. def appendImplDefSuper(implDef: scala.reflect.macros.Universe.ImplDef, classInfoAction: (ClassDefinition) ⇒ List[scala.reflect.macros.Universe.Tree]): scala.reflect.macros.Universe.Tree

    Permalink
    Definition Classes
    AbstractMacroProcessor
  7. def appendModuleBody(compDeclOpt: Option[scala.reflect.macros.Universe.ModuleDef], codeBlocks: List[scala.reflect.macros.Universe.Tree], className: scala.reflect.macros.Universe.TypeName): scala.reflect.macros.Universe.Tree

    Permalink

    Modify companion object or object.

    Modify companion object or object.

    returns

    Return a scala.reflect.api.Trees#ModuleDef which was appended codeblocks, ModuleDef may already exist or may be newly created

    Definition Classes
    AbstractMacroProcessor
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. val c: Context

    Permalink
  10. def checkAnnottees(annottees: Seq[scala.reflect.macros.Universe.Expr[Any]]): Unit

    Permalink

    Check the input tree of the annotation.

    Check the input tree of the annotation.

    Definition Classes
    AbstractMacroProcessor
  11. def checkGetClassDef(annottees: Seq[scala.reflect.macros.Universe.Expr[Any]]): scala.reflect.macros.Universe.ClassDef

    Permalink

    Check the class and its companion object, and return the class definition.

    Check the class and its companion object, and return the class definition.

    returns

    Return a scala.reflect.api.Trees#ClassDef

    Definition Classes
    AbstractMacroProcessor
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  13. def collectCustomExpr(annottees: Seq[scala.reflect.macros.Universe.Expr[Any]])(modifyAction: (scala.reflect.macros.Universe.ClassDef, Option[scala.reflect.macros.Universe.ModuleDef]) ⇒ Any): scala.reflect.macros.Universe.Expr[Nothing]

    Permalink

    Modify the associated object itself according to whether there is an associated object.

    Modify the associated object itself according to whether there is an associated object.

    modifyAction

    The actual processing function

    returns

    Return the result of modifyAction function

    Definition Classes
    AbstractMacroProcessor
  14. def createCustomExpr(classDecl: scala.reflect.macros.Universe.ClassDef, compDeclOpt: Option[scala.reflect.macros.Universe.ModuleDef] = None): Any

    Permalink

    Subclasses should override the method and return the final result abstract syntax tree, or an abstract syntax tree close to the final result.

    Subclasses should override the method and return the final result abstract syntax tree, or an abstract syntax tree close to the final result.

    returns

    c.Expr[Any], Why use Any? The dependent type need aux-pattern in scala2. Now let's get around this.

    Definition Classes
    AbstractMacroProcessor
  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  17. def evalTree[T](tree: scala.reflect.macros.Universe.Tree)(implicit arg0: scala.reflect.macros.Universe.WeakTypeTag[T]): T

    Permalink

    Eval the input tree.

    Eval the input tree.

    Definition Classes
    AbstractMacroProcessor
  18. def existsSuperClassExcludeSdkClass(superClasses: Seq[scala.reflect.macros.Universe.Tree]): Boolean

    Permalink

    Is there a parent class? Does not contains sdk class, such as AnyRef and Object.

    Is there a parent class? Does not contains sdk class, such as AnyRef and Object.

    returns

    Return true if there is a non-SDK super class

    Definition Classes
    AbstractMacroProcessor
  19. def extractClassTypeParamsTypeName(tpParams: List[scala.reflect.macros.Universe.Tree]): List[scala.reflect.macros.Universe.TypeName]

    Permalink

    Gets a list of generic parameters.

    Gets a list of generic parameters. This is because the generic parameters of a class cannot be used directly in the return type, and need to be converted.

    returns

    Return a sequence of scala.reflect.api.Names#TypeName

    Definition Classes
    AbstractMacroProcessor
  20. def findValDefInEnclosingClass(t: scala.reflect.macros.Universe.Name): Option[scala.reflect.macros.Universe.TermName]

    Permalink

    Find the specified val Name in the enclosingClass definition.

    Find the specified val Name in the enclosingClass definition.

    returns

    Return a optional scala.reflect.api.Names#TermName

    Definition Classes
    AbstractMacroProcessor
  21. def getApplyMethodWithCurrying(typeName: scala.reflect.macros.Universe.TypeName, fieldss: List[List[scala.reflect.macros.Universe.Tree]], classTypeParams: List[scala.reflect.macros.Universe.Tree]): scala.reflect.macros.Universe.Tree

    Permalink

    We generate apply method with currying, and we have to deal with the first layer of currying alone.

    We generate apply method with currying, and we have to deal with the first layer of currying alone.

    returns

    A apply method with currying.

    Definition Classes
    AbstractMacroProcessor
    Example:
    1. Return a tree, such as def apply(int: Int)(j: Int)(k: Option[String])(t: Option[Long]): B3 = new B3(int)(j)(k)(t)

  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  23. def getClassConstructorValDefsFlatten(annotteeClassParams: List[List[scala.reflect.macros.Universe.Tree]]): Seq[scala.reflect.macros.Universe.ValDef]

    Permalink

    Extract the constructor params ValDef and flatten for currying.

    Extract the constructor params ValDef and flatten for currying.

    returns

    Return a sequence of scala.reflect.api.Trees#ValDef

    Definition Classes
    AbstractMacroProcessor
  24. def getClassConstructorValDefsNotFlatten(annotteeClassParams: List[List[scala.reflect.macros.Universe.Tree]]): Seq[Seq[scala.reflect.macros.Universe.ValDef]]

    Permalink

    Extract the constructor params scala.reflect.api.Trees#ValDef not flatten.

    Extract the constructor params scala.reflect.api.Trees#ValDef not flatten.

    returns

    Return a double sequence of scala.reflect.api.Trees#ValDef

    Definition Classes
    AbstractMacroProcessor
  25. def getClassMemberDefDefs(annotteeClassDefinitions: Seq[scala.reflect.macros.Universe.Tree]): Seq[scala.reflect.macros.Universe.DefDef]

    Permalink

    Extract the methods belonging to the class, contains Secondary Constructor.

    Extract the methods belonging to the class, contains Secondary Constructor.

    returns

    Return a sequence of scala.reflect.api.Trees#DefDef

    Definition Classes
    AbstractMacroProcessor
  26. def getClassMemberValDefs(annotteeClassDefinitions: Seq[scala.reflect.macros.Universe.Tree]): Seq[scala.reflect.macros.Universe.ValDef]

    Permalink

    Extract the internal fields of members belonging to the class, but not in primary constructor.

    Extract the internal fields of members belonging to the class, but not in primary constructor.

    returns

    Return a sequence of scala.reflect.api.Trees#ValDef

    Definition Classes
    AbstractMacroProcessor
  27. def getConstructorParamsNameWithType(annotteeClassParams: Seq[scala.reflect.macros.Universe.Tree]): Seq[scala.reflect.macros.Universe.Tree]

    Permalink

    Get the field TermName with type.

    Get the field TermName with type.

    returns

    Return a sequence of scala.reflect.api.Trees#Tree, each one is tname: tpt

    Definition Classes
    AbstractMacroProcessor
  28. def getConstructorWithCurrying(typeName: scala.reflect.macros.Universe.TypeName, fieldss: List[List[scala.reflect.macros.Universe.Tree]], isCase: Boolean): scala.reflect.macros.Universe.Tree

    Permalink

    We generate constructor with currying, and we have to deal with the first layer of currying alone.

    We generate constructor with currying, and we have to deal with the first layer of currying alone.

    returns

    A constructor with currying, it not contains tpt, provide for calling method.

    Definition Classes
    AbstractMacroProcessor
    Example:
    1. Return a tree, such as new TestClass12(i)(j)(k)(t)

  29. def getModuleDefOption(annottees: Seq[scala.reflect.macros.Universe.Expr[Any]]): Option[scala.reflect.macros.Universe.ModuleDef]

    Permalink

    Get object if it exists.

    Get object if it exists.

    returns

    Return a optional scala.reflect.api.Trees#ModuleDef

    Definition Classes
    AbstractMacroProcessor
  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  31. def impl(annottees: scala.reflect.macros.Universe.Expr[Any]*): scala.reflect.macros.Universe.Expr[Any]

    Permalink

    Subclasses should override this method if it cannot use createCustomExpr method.

    Subclasses should override this method if it cannot use createCustomExpr method.

    returns

    Return a macro expanded final syntax tree.

    Definition Classes
    ElapsedProcessorAbstractMacroProcessor
  32. def isCaseClass(annotateeClass: scala.reflect.macros.Universe.ClassDef): Boolean

    Permalink

    Check whether the class is a case class.

    Check whether the class is a case class.

    annotateeClass

    classDef

    returns

    Return true if it is a case class

    Definition Classes
    AbstractMacroProcessor
  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. def isNotLocalClassMember(tree: scala.reflect.macros.Universe.Tree): Boolean

    Permalink

    Check whether the mods of the fields has a private[this] or protected[this], because it cannot be used out of class.

    Check whether the mods of the fields has a private[this] or protected[this], because it cannot be used out of class.

    tree

    Tree is a field or method?

    returns

    Return false if mods exists private[this] or protected[this]

    Definition Classes
    AbstractMacroProcessor
  35. def mapToClassDeclInfo(classDecl: scala.reflect.macros.Universe.ClassDef): ClassDefinition

    Permalink

    Extract the necessary structure information of the class for macro programming.

    Extract the necessary structure information of the class for macro programming.

    returns

    Return the expansion of the class definition as org.bitlap.tools.macros.AbstractMacroProcessor#ClassDefinition

    Definition Classes
    AbstractMacroProcessor
  36. def mapToMethodDef(defDef: scala.reflect.macros.Universe.DefDef, defBodyAction: ⇒ scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.DefDef

    Permalink

    Modify the method body of the method tree.

    Modify the method body of the method tree.

    defBodyAction

    Method body of final result

    returns

    Return a new scala.reflect.api.Trees#DefDef which changed by defBodyAction function

    Definition Classes
    AbstractMacroProcessor
  37. def mapToModuleDeclInfo(moduleDef: scala.reflect.macros.Universe.ModuleDef): ClassDefinition

    Permalink

    Extract the necessary structure information of the moduleDef for macro programming.

    Extract the necessary structure information of the moduleDef for macro programming.

    returns

    Return the expansion of the class definition as org.bitlap.tools.macros.AbstractMacroProcessor#ClassDefinition

    Definition Classes
    AbstractMacroProcessor
  38. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  40. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  41. def prependImplDefBody(implDef: scala.reflect.macros.Universe.ImplDef, classInfoAction: (ClassDefinition) ⇒ List[scala.reflect.macros.Universe.Tree]): scala.reflect.macros.Universe.Tree

    Permalink
    Definition Classes
    AbstractMacroProcessor
  42. def printTree(force: Boolean, resTree: scala.reflect.macros.Universe.Tree): Unit

    Permalink

    Output ast result.

    Output ast result.

    Definition Classes
    AbstractMacroProcessor
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. def toScalaType(jType: String): String

    Permalink

    Only for primitive types, we can get type and map to scala type.

    Only for primitive types, we can get type and map to scala type.

    jType

    java type name

    returns

    Scala type name

    Definition Classes
    AbstractMacroProcessor
  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. def valDefAccessors(params: Seq[scala.reflect.macros.Universe.Tree]): Seq[ValDefAccessor]

    Permalink

    Retrieves the accessor fields on a class and returns a Seq of org.bitlap.tools.macros.AbstractMacroProcessor#ValDefAccessor.

    Retrieves the accessor fields on a class and returns a Seq of org.bitlap.tools.macros.AbstractMacroProcessor#ValDefAccessor.

    params

    The list of params retrieved from the class

    returns

    Return a sequence of org.bitlap.tools.macros.AbstractMacroProcessor#ValDefAccessor

    Definition Classes
    AbstractMacroProcessor
  47. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AbstractMacroProcessor

Inherited from AnyRef

Inherited from Any

Ungrouped