001/* 002 * Copyright 2002-2012 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.aop; 018 019/** 020 * Core Spring pointcut abstraction. 021 * 022 * <p>A pointcut is composed of a {@link ClassFilter} and a {@link MethodMatcher}. 023 * Both these basic terms and a Pointcut itself can be combined to build up combinations 024 * (e.g. through {@link org.springframework.aop.support.ComposablePointcut}). 025 * 026 * @author Rod Johnson 027 * @see ClassFilter 028 * @see MethodMatcher 029 * @see org.springframework.aop.support.Pointcuts 030 * @see org.springframework.aop.support.ClassFilters 031 * @see org.springframework.aop.support.MethodMatchers 032 */ 033public interface Pointcut { 034 035 /** 036 * Return the ClassFilter for this pointcut. 037 * @return the ClassFilter (never {@code null}) 038 */ 039 ClassFilter getClassFilter(); 040 041 /** 042 * Return the MethodMatcher for this pointcut. 043 * @return the MethodMatcher (never {@code null}) 044 */ 045 MethodMatcher getMethodMatcher(); 046 047 048 /** 049 * Canonical Pointcut instance that always matches. 050 */ 051 Pointcut TRUE = TruePointcut.INSTANCE; 052 053}