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:
@ -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
|
||||
|
Reference in New Issue
Block a user