module
Crygen::Modules::Annotation
Overview
Module that is used to store and add the annotations.
Included Modules
Direct including types
- Crygen::Types::Class
- Crygen::Types::Enum
- Crygen::Types::LibC
- Crygen::Types::Method
- Crygen::Types::Struct
Defined in:
modules/annotation.crInstance Method Summary
-
#add_annotation(annotation_type : Crygen::Types::Annotation) : self
Adds annotation(s) onto object.
Instance methods inherited from module Crygen::Helpers::Annotation
add_link(name : String) : self
add_link,
as_deprecated(message : String) : selfas_deprecated : self as_deprecated, as_experimental(message : String) : self
as_experimental : self as_experimental, as_flags : self as_flags
Instance Method Detail
Adds annotation(s) onto object. Example:
class_type = CGT::Class.new("Person")
class_type.add_annotation(CGT::Annotation.new("Experimental"))
class_type.add_annotation(CGT::Annotation.new("AnotherAnnotation"))
Output:
@[Experimental]
@[AnotherAnnotation]
class Person
end