module Crystal::Annotatable

Direct including types

Defined in:

compiler/crystal/annotatable.cr

Instance Method Summary

Instance Method Detail

def add_annotation(annotation_type : AnnotationType, value : Annotation) #

Adds an annotation with the given type and value


[View source]
def all_annotations : Array(Annotation) | Nil #

Returns all annotations on this type, if any, or nil otherwise


[View source]
def annotation(annotation_type : AnnotationType) : Annotation | Nil #

Returns the last defined annotation with the given type, if any, or nil otherwise


[View source]
def annotations(annotation_type : AnnotationType) : Array(Annotation) | Nil #

Returns all annotations with the given type, if any, or nil otherwise


[View source]
def annotations : Hash(AnnotationType, Array(Annotation)) | Nil #

Annotations on this instance


[View source]
def annotations=(annotations : Hash(AnnotationType, Array(Annotation)) | Nil) #

Annotations on this instance


[View source]