1 package org.apache.maven.shared.artifact.filter.resolve; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 /** 23 * Provide a mechanism to transform a Filter to a tool specific equivalent using the visitor pattern. 24 * For example: Aether has its own set of filters. 25 * 26 * @author Robert Scholte 27 * @param <T> the tool specific filter 28 * @since 3.0 29 */ 30 public interface FilterTransformer<T> 31 { 32 /** 33 * Transform the scopeFilter to T specific implementation 34 * 35 * @param scopeFilter the filter 36 * @return the transformed filter, never {@code null} 37 */ 38 T transform( ScopeFilter scopeFilter ); 39 40 /** 41 * Transform the andFilter to T specific implementation 42 * 43 * @param andFilter the filter 44 * @return the transformed filter, never {@code null} 45 */ 46 T transform( AndFilter andFilter ); 47 48 /** 49 * Transform the exclusionsFilter to T specific implementation 50 * 51 * @param exclusionsFilter the filter 52 * @return the transformed filter, never {@code null} 53 */ 54 T transform( ExclusionsFilter exclusionsFilter ); 55 56 /** 57 * Transform the orFilter to T specific implementation 58 * 59 * @param orFilter the filter 60 * @return the transformed filter, never {@code null} 61 */ 62 T transform( OrFilter orFilter ); 63 64 /** 65 * Transform the patternExclusionsFilter to T specific implementation 66 * 67 * @param patternExclusionsFilter the filter 68 * @return the transformed filter, never {@code null} 69 */ 70 T transform( PatternExclusionsFilter patternExclusionsFilter ); 71 72 /** 73 * Transform the paternInclusionsFilter to T specific implementation 74 * 75 * @param patternInclusionsFilter the filter 76 * @return the transformed filter, never {@code null} 77 */ 78 T transform( PatternInclusionsFilter patternInclusionsFilter ); 79 80 /** 81 * Transform a custom filter to T specific implementation 82 * 83 * @param abstractFilter the filter 84 * @return the transformed filter, never {@code null} 85 */ 86 T transform( AbstractFilter abstractFilter ); 87 }