forked from phoedos/pmd
Rename RecordDeclaration::getComponentList to getRecordComponents
This name is clearer when seen from the interface ASTAnyTypeDeclaration, also it matches the Class API
This commit is contained in:
parent
954bfb28d4
commit
ea532e6d2d
@ -132,6 +132,7 @@ implementations, and their corresponding Parser if it exists (in the same packag
|
||||
* {% jdoc !!core::cpd.token.AntlrToken#getType() %} - use `getKind()` instead.
|
||||
* {% jdoc core::lang.rule.ImmutableLanguage %}
|
||||
* {% jdoc core::lang.rule.MockRule %}
|
||||
* {% jdoc !!java::lang.java.ast.ASTRecordDeclaration#getComponentList() %}
|
||||
* Multiple fields, constructors and methods in {% jdoc core::lang.rule.XPathRule %}. See javadoc for details.
|
||||
|
||||
### External Contributions
|
||||
|
@ -57,7 +57,18 @@ public final class ASTRecordDeclaration extends AbstractAnyTypeDeclaration {
|
||||
return isNested();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Renamed to {@link #getRecordComponents()}
|
||||
*/
|
||||
@Deprecated
|
||||
public ASTRecordComponentList getComponentList() {
|
||||
return getRecordComponents();
|
||||
}
|
||||
|
||||
/** Returns the record component list. */
|
||||
// @NonNull
|
||||
@Override
|
||||
public ASTRecordComponentList getRecordComponents() {
|
||||
return getFirstChildOfType(ASTRecordComponentList.class);
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,16 @@ public abstract class AbstractAnyTypeDeclaration extends AbstractJavaAccessTypeN
|
||||
return getImage();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the record component list, or null if this is not a record
|
||||
* declaration.
|
||||
*/
|
||||
// @Nullable // TODO pull up to ASTAnyTypeDecl on 7.0.x
|
||||
public ASTRecordComponentList getRecordComponents() {
|
||||
return getFirstChildOfType(ASTRecordComponentList.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the enclosing type of this type declaration
|
||||
* is any of the given kinds. If this declaration is a top-level
|
||||
|
Loading…
x
Reference in New Issue
Block a user