protected NoSuchCompositeTypeException( String metaType, String compositeType, ModuleDescriptor module ) { super( NL + "\tCould not find any visible " + metaType + " of type [" + compositeType + "] in module [" + module.name() + "]." ); this.metaType = metaType; this.compositeType = compositeType; this.moduleName = module.name(); visibleTypes = formatVisibleTypes( module.typeLookup() ); candidateTypes = findCandidateTypes( module ); }
private String formatVisibleTypes( TypeLookup typeLookup ) { return descriptors( typeLookup ) .map( descriptor -> { String moduleName = descriptor.module().name(); String typeName = descriptor.primaryType().getName(); return "\t\t[" + typeName + "] in [" + moduleName + "]"; } ) .sorted() .distinct() .collect( joining( NL, "\tVisible " + metaType + " types are:" + NL, "" ) ); }
private String formatVisibleTypes( TypeLookup typeLookup ) { return descriptors( typeLookup ) .map( descriptor -> { String moduleName = descriptor.module().name(); String typeName = descriptor.primaryType().getName(); return "\t\t[" + typeName + "] in [" + moduleName + "]"; } ) .sorted() .distinct() .collect( joining( NL, "\tVisible " + metaType + " types are:" + NL, "" ) ); }
protected NoSuchCompositeTypeException( String metaType, String compositeType, ModuleDescriptor module ) { super( NL + "\tCould not find any visible " + metaType + " of type [" + compositeType + "] in module [" + module.name() + "]." ); this.metaType = metaType; this.compositeType = compositeType; this.moduleName = module.name(); visibleTypes = formatVisibleTypes( module.typeLookup() ); candidateTypes = findCandidateTypes( module ); }