001/* 002 * Copyright 2002-2017 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.core; 018 019/** 020 * Interface to be implemented by objects that can return information about 021 * the current call stack. Useful in AOP (as in AspectJ cflow concept) 022 * but not AOP-specific. 023 * 024 * @author Rod Johnson 025 * @since 02.02.2004 026 * @deprecated as of Spring Framework 4.3.6 027 */ 028@Deprecated 029public interface ControlFlow { 030 031 /** 032 * Detect whether we're under the given class, 033 * according to the current stack trace. 034 * @param clazz the clazz to look for 035 */ 036 boolean under(Class<?> clazz); 037 038 /** 039 * Detect whether we're under the given class and method, 040 * according to the current stack trace. 041 * @param clazz the clazz to look for 042 * @param methodName the name of the method to look for 043 */ 044 boolean under(Class<?> clazz, String methodName); 045 046 /** 047 * Detect whether the current stack trace contains the given token. 048 * @param token the token to look for 049 */ 050 boolean underToken(String token); 051 052}