One class becomes the system
The class gradually absorbs policy, orchestration, validation, and infrastructure work until everything depends on it.
The God class, sometimes called a Blob, is one of the easiest anti-patterns to recognize and one of the hardest to untangle once it has matured. It becomes the default home for new rules, integrations, validations, orchestration, and metrics because it already sits in the middle of everything. Over time, the system starts to revolve around it.
Order placement, cancellation, refunds, inventory handling, shipment coordination, and notifications can all end up trapped inside one Java service. When that happens, every change competes for the same file and the same mental model. The class becomes a bottleneck for understanding, testing, and team ownership.
The God class anti-pattern often begins with success. One service or manager class works well for the first few use cases, so new behavior gets added there by default. Eventually the class becomes the only place that knows how the system works, and that centrality starts to damage cohesion and changeability.
In Java systems, frameworks can accelerate this problem because service classes already feel like legitimate homes for orchestration. Without careful responsibility discipline, they slowly absorb domain logic, integration concerns, retries, validation, and notification side effects.
Refactoring a God class usually means rediscovering the missing design: use cases, domain objects, policies, and collaborator boundaries that should have existed earlier.
The class gradually absorbs policy, orchestration, validation, and infrastructure work until everything depends on it.
Every new business rule arrives in the same place, which multiplies regression risk and merge pressure.
The code can still be organized into methods, but the underlying responsibilities are no longer coherent.
package org.javaomnibus.ecommerce.antipatterns;
public final class OrderManagerService {
public OrderReceipt placeOrder(CheckoutRequest request) {
validateCustomer(request.customerId());
validateDiscountCode(request.discountCode());
reserveInventory(request.items());
authorizePayment(request.paymentMethod(), request.total());
saveOrder(request);
createShipment(request);
sendOrderConfirmation(request.customerEmail());
publishMetrics(request);
return new OrderReceipt("ORD-5501");
}
public void cancelOrder(String orderId) {}
public void refundOrder(String orderId) {}
public void retryPayment(String orderId) {}
}
Not every central service is a Blob. Some coordination classes are valid. The anti-pattern appears when the class stops being a narrow coordinator and starts becoming the default home for unrelated responsibilities.