TypeLike

io.joern.x2cpg.datastructures.TypeLike
trait TypeLike[M <: MethodLike, F <: FieldLike]

A type declaration or module. Holds methods and field entities.

Type parameters

F

the field/object property meta data class.

M

the method/function meta data class.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def +(o: TypeLike[M, F]): TypeLike[M, F]

Adds the contents of the two types and produces a new type.

Adds the contents of the two types and produces a new type.

Value parameters

o

the other type-like.

Attributes

Returns

a type-like that is the combination of the two, with precedence to colliding contents to this type (LHS).

def fields: List[F]

Attributes

Returns

the fields/properties declared directly under the type declaration.

def methods: List[M]

Attributes

Returns

the methods declared directly under the type declaration.

def name: String

Attributes

Returns

the type full name.

Concrete methods

protected def mergeFields(o: TypeLike[_, F]): List[F]

Helper method for creating the sum of two type-like's fields, while preferring this types' fields on collisions.

Helper method for creating the sum of two type-like's fields, while preferring this types' fields on collisions.

Value parameters

o

the other type-like.

Attributes

Returns

the combination of the two type-like's fields.

protected def mergeMethods(o: TypeLike[M, _]): List[M]

Helper method for creating the sum of two type-like's methods, while preferring this types' methods on collisions.

Helper method for creating the sum of two type-like's methods, while preferring this types' methods on collisions.

Value parameters

o

the other type-like.

Attributes

Returns

the combination of the two type-like's methods.