functions.JEAFDeprecated.ext Maven / Gradle / Ivy
extension java::GeneratorCommons;
extension functions::Javadoc;
cached boolean isJEAFDeprecated(uml::Element element) :
element.isStereotypeApplied("JEAFDeprecated");
cached JMM::JEAFDeprecated asDeprecated(uml::Element element):
(JMM::JEAFDeprecated) element;
cached String getDeprecationDescription(uml::NamedElement element):
if element.isJEAFDeprecated()
then element.getStereotypeValue("JEAFDeprecated", "description")
else "";
cached String getDeprecationDescriptionForMarkup(uml::NamedElement element):
element.getDeprecationDescription().replaceAll("\n", "
");
cached String getDeprecationDescriptionForJavadoc(uml::NamedElement element):
element.getDeprecationDescription().convertCommentForJavadoc();
cached String getDeprecatedSince(uml::NamedElement element):
if element.isJEAFDeprecated()
then element.getStereotypeValue("JEAFDeprecated", "since")
else "";
cached String getDeprecationRemoval(uml::NamedElement element):
if element.isJEAFDeprecated()
then element.getStereotypeValue("JEAFDeprecated", "removedWith")
else "";
cached boolean isDeprecationComplete(uml::NamedElement element):
element.getDeprecationDescription().length > 0 && element.getDeprecatedSince().length > 0 && element.getDeprecationRemoval().length > 0;
cached boolean hasDeprecationDetails(uml::NamedElement element):
element.getDeprecatedSince().length > 0 || element.getDeprecationRemoval().length > 0;
cached boolean hasMeaningfulDeprecationInfo(uml::NamedElement element):
element.getDeprecationDescription().length > 0 || element.getDeprecatedSince().length > 0 || element.getDeprecationRemoval().length > 0;