EN
Java - class, utils, interface, variables - naming convention - ideas and examples
4
points
Class or fields should be named as noun.
Class naming ideas in java - keywords:
- Reader
- Writer
- Builder
- Mapper
- Executor
- Changer
- Manager
- Service
- Component
- Repository
- Exchanger
- Context
- Status
- Consumer
- Producer
- Optimizer
- Scheduler
- Crawler
- Path
- File
- State
- Synchronizer
- Analyzer
- Collector | Collectors
- Provider
- Converter
- Fetcher
- Detector
- Processor
- Generator
Class naming ideas in java - services:
- ContextManager
- ConnectionManager
- ContextProvider
- FileScheduler
- FileGenerator
- FileProducer
- FileConsumer
- UserRepository
- UserService
Class naming ideas in java - collections / objects:
- Object
- List (ArrayList, LinkedList, Vector)
- Queue (PriorityQueue)
- Stack
- Map (HashMap, Hashtable)
- Set (HashSet, TreeSet)
Utils class naming ideas in java:
- FilesUtil
- PathsUtil
- StringUtil
- MathUtil
- Base64Util
- DateTimeUtil
- DomainUrlUtil
- HtmlUtil
- IpUtil
- LoggerUtil
- PageContextUtil
- PathsUtil
- RandomUtil
- SqlUtil
- UrlConverterUtil
- Files
- Config
Interface naming ideas in java:
- Comparable
- Comparable
- Serializable
- Runnable
- Callable
- ConcurrentNavigableMap
- ConcurrentMap
- Delayed
- BlockingDeque
- BlockingQueue
- Executor
- CompletionService
- CompletionStage
- ExecutorService
- Future
- RejectedExecutionHandler
- RunnableFuture
- RunnableScheduledFuture
- ScheduledExecutorService
- ScheduledFuture
Constants
- FileConstants
- UserConstants
- DomainConstants
Enum naming conventions
- CategoryType
- CategoryTypes
- CategoryEnum
- DocumetMode (read, write)
- UserRole (admin, moderator)
Other examples:
- PostCreatorController
- PostFinderController
Also take a look at post with java methods naming convention and examples here: