abstract class naming convention [closed]

Should we have a team coding standard that the names of abstract classes have prefix Abstract ? e.g.

public abstract class AbstractB implements B {}

Solution 1:

Yes, in fact if you look at the javadocs of the standard library at http://download.oracle.com/javase/6/docs/api/ you'll find that the list of classes in the bottom-left frame begins with abstract classes using the naming convention you have mentioned in your question.

AbstractAction
AbstractAnnotationValueVisitor6
AbstractBorder
AbstractButton
AbstractCellEditor
AbstractCollection
AbstractColorChooserPanel
AbstractDocument
AbstractDocument.AttributeContext
AbstractDocument.Content
AbstractDocument.ElementEdit
AbstractElementVisitor6
AbstractExecutorService
AbstractInterruptibleChannel
AbstractLayoutCache
AbstractLayoutCache.NodeDimensions
AbstractList
AbstractListModel
AbstractMap
AbstractMap.SimpleEntry
AbstractMap.SimpleImmutableEntry
AbstractMarshallerImpl
AbstractMethodError
AbstractOwnableSynchronizer
AbstractPreferences
AbstractProcessor
AbstractQueue
AbstractQueuedLongSynchronizer
AbstractQueuedSynchronizer
AbstractScriptEngine
AbstractSelectableChannel
AbstractSelectionKey
AbstractSelector
AbstractSequentialList
AbstractSet
AbstractSpinnerModel
AbstractTableModel
AbstractTypeVisitor6
AbstractUndoableEdit
AbstractUnmarshallerImpl
AbstractWriter

Take any one of them, say the first one, and check its definition: AbstractAction. It indeed implements Action which is again similar to your convention. It's subclasses are named like: ClosedAction, MaximizeAction, etc.

Solution 2:

Generally any kind of standard is a good thing in a team setting. Otherwise team members might name classes in such a way that only they understand and then you could get a mix of people's different coding styles which leads to confusion.