spoon.reflect.code.CtJavaDoc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spoon-core Show documentation
Show all versions of spoon-core Show documentation
Spoon is a tool for meta-programming, analysis and transformation of Java programs.
/*
* SPDX-License-Identifier: (MIT OR CECILL-C)
*
* Copyright (C) 2006-2023 INRIA and contributors
*
* Spoon is available either under the terms of the MIT License (see LICENSE-MIT.txt) or the Cecill-C License (see LICENSE-CECILL-C.txt). You as the user are entitled to choose the terms under which to adopt Spoon.
*/
package spoon.reflect.code;
import spoon.javadoc.internal.JavadocDescriptionElement;
import spoon.support.DerivedProperty;
import spoon.reflect.annotations.PropertyGetter;
import spoon.reflect.annotations.PropertySetter;
import java.util.List;
import static spoon.reflect.path.CtRole.COMMENT_TAG;
/**
* This code element defines a javadoc comment
*
* Example:
*
* /**
* * Description
* * @tag a tag in the javadoc
* */
*
*/
public interface CtJavaDoc extends CtComment {
/**
* Get all the tag of the javadoc
* @return the tag list
*/
@PropertyGetter(role = COMMENT_TAG)
List getTags();
/**
* Define the list of tags
* @param tags the new list of tags
*/
@PropertySetter(role = COMMENT_TAG)
E setTags(List tags);
/**
* Add a new tag at the end of the list
* @param tag the new tag
*/
@PropertySetter(role = COMMENT_TAG)
E addTag(CtJavaDocTag tag);
/**
* Add a new tag at the index position
* @param index the index of the new tag
* @param tag the new tag
*/
@PropertySetter(role = COMMENT_TAG)
E addTag(int index, CtJavaDocTag tag);
/**
* Remove a tag from the index
* @param index the position of the tag to remove
*/
@PropertySetter(role = COMMENT_TAG)
E removeTag(int index);
/**
* Remove a specific tag
* @param tag the tag to remove
*/
@PropertySetter(role = COMMENT_TAG)
E removeTag(CtJavaDocTag tag);
/**
* Get the short summary of the javadoc (first sentence of the javadoc)
* @return the summary of the javadoc
*/
@DerivedProperty
String getShortDescription();
/**
* Get the long description of the javadoc
* @return the long description of the javadoc
*/
@DerivedProperty
String getLongDescription();
@Override
CtJavaDoc clone();
/** Returns the list of parsed Javadoc elements */
@DerivedProperty
List getJavadocElements();
}