private AppliedNameForms factoryImplementationBuilder() { boolean isOutside = isOutsideBuilder(); Naming methodBuilderNaming = isOutside ? names().namings.newBuilder : names().namings.builder; boolean haveConstructorOnBuilder = isOutside || isConstantNamingEquals(methodBuilderNaming, NEW_KEYWORD); NameForms typeNameForms = haveConstructorOnBuilder ? typeBuilder() : typeImmutable(); return typeNameForms.applied(methodBuilderNaming.apply(names().raw)); }
private AppliedNameForms applyFactoryNaming(Naming naming) { String raw = names().raw; boolean hasForwardingFactoryMethods = isImplementationHidden() && protoclass().kind().isNested(); NameForms nameForms = hasForwardingFactoryMethods ? typeEnclosingFactory() : typeImmutable(); if (hasForwardingFactoryMethods) { naming = naming.requireNonConstant(Preference.PREFIX); } String applyName = Naming.Usage.LOWERIZED.apply(naming.apply(raw)); return nameForms.applied(applyName); }