ppkarwasz commented on code in PR #747: URL: https://github.com/apache/commons-compress/pull/747#discussion_r2532259511
########## src/main/java/org/apache/commons/compress/harmony/internal/AttributeLayoutParser.java: ########## @@ -0,0 +1,422 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.commons.compress.harmony.internal; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.apache.commons.compress.harmony.pack200.Pack200Exception; +import org.apache.commons.lang3.Range; + +/** + * Encapsulates parsing of attribute layout definitions. + * + * <p>Previously the parsing logic was duplicated in {@link org.apache.commons.compress.harmony.pack200.NewAttributeBands} and + * {@link org.apache.commons.compress.harmony.unpack200.NewAttributeBands}.</p> + * + * @param <LAYOUT_ELEMENT> the type corresponding to the {@code layout_element} production + * @param <ATTRIBUTE_LAYOUT_ELEMENT> the type corresponding to the elements of the {@code attribute_layout} production: either {@code layout_element} or + * {@code callable} + */ +public final class AttributeLayoutParser<ATTRIBUTE_LAYOUT_ELEMENT, LAYOUT_ELEMENT extends ATTRIBUTE_LAYOUT_ELEMENT> { Review Comment: Regarding `@since`: because these classes live in an internal package that is not exported to other modules, they are not part of the public API surface. External code cannot use them, so a `@since` tag would not be useful: the class is simply present in this release or it isn’t. On the generic parameter names: the original version uses different interfaces for top-level elements and nested elements. In the naming of the parameters I tried to follow the name of those interfaces. However, as of 6ccaf88216fcbf45416a22d0e48e20e0de945eaf the hierarchy has been flattened and a single type parameter is now used. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
