@Override
        public String apply(Object type, String indent) {
            Symbol typeSymbol;
            if (type instanceof Symbol) {
                typeSymbol = (Symbol) type;
            } else if (type instanceof Class<?>) {
                typeSymbol = TraitCodegenUtils.fromClass((Class<?>) type);
            } else {
                throw new IllegalArgumentException("Invalid type provided for $T. Expected a Symbol or Class "
                        + "but found: `" + type + "`.");
            }

            if (typeSymbol.getReferences().isEmpty()) {
                return getPlaceholder(typeSymbol);
            }

            // Add type references as type references (ex. `List<InnerType>`)
            StringBuilder builder = new StringBuilder();
            processSymbol(typeSymbol, builder);
            return builder.toString();
        }
Implements a formatter for {@code $T} that formats Java types.
smithy-trait-codegen/src/main/java/software/amazon/smithy/traitcodegen/writer/TraitCodegenWriter.java