/** * Copy constructor. * * @param prototype the prototype */ protected EnumConstantImpl(EnumConstant prototype) { name = requireNonNull(prototype).getName(); javadoc = prototype.getJavadoc().orElse(null); imports = Copier.copy(prototype.getImports()); classes = Copier.copy(prototype.getClasses(), c -> c.copy()); initializers = Copier.copy(prototype.getInitializers(), c -> c.copy()); methods = Copier.copy(prototype.getMethods(), c -> c.copy()); fields = Copier.copy(prototype.getFields(), c -> c.copy()); values = Copier.copy(prototype.getValues(), c -> c.copy()); annotations = Copier.copy(prototype.getAnnotations(), c -> c.copy()); }
/** * Copy constructor. * * @param prototype the prototype */ protected EnumConstantImpl(EnumConstant prototype) { name = requireNonNull(prototype).getName(); javadoc = prototype.getJavadoc().orElse(null); imports = Copier.copy(prototype.getImports()); classes = Copier.copy(prototype.getClasses(), c -> c.copy()); initializers = Copier.copy(prototype.getInitializers(), c -> c.copy()); methods = Copier.copy(prototype.getMethods(), c -> c.copy()); fields = Copier.copy(prototype.getFields(), c -> c.copy()); values = Copier.copy(prototype.getValues(), c -> c.copy()); annotations = Copier.copy(prototype.getAnnotations(), c -> c.copy()); }