As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center提供指导。
9年前关闭。
我们是否应该有一个团队编码标准,使抽象类的名称带有前缀
选择其中任何一个,说第一个,并检查其定义:
9年前关闭。
我们是否应该有一个团队编码标准,使抽象类的名称带有前缀
Abstract
?例如public abstract class AbstractB implements B {}
最佳答案
是的,事实上,如果您查看http://download.oracle.com/javase/6/docs/api/上标准库的javadocs,您会发现左下框架中的类列表使用您在问题中提到的命名约定以抽象类开头。
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
选择其中任何一个,说第一个,并检查其定义:
AbstractAction
。实际上,它实现了Action
,它再次类似于您的约定。它的子类的名称如下:ClosedAction
,MaximizeAction
等。