All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.pmd.lang.java.ast.JavadocComment Maven / Gradle / Ivy

There is a newer version: 7.7.0
Show newest version
/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.java.ast;

import org.checkerframework.checker.nullness.qual.Nullable;

import net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken;

/**
 * A {@link JavaComment} that has Javadoc content.
 */
public final class JavadocComment extends JavaComment {

    private JavadocCommentOwner owner;

    JavadocComment(JavaccToken t) {
        super(t);
        assert t.kind == JavaTokenKinds.FORMAL_COMMENT;
    }

    void setOwner(JavadocCommentOwner owner) {
        this.owner = owner;
    }

    /**
     * Returns the owner of this comment. Null if this comment is 
     * misplaced.
     */
    public @Nullable JavadocCommentOwner getOwner() {
        return owner;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy