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 http://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.
Type | Name and description |
---|---|
static Class |
getCallingClass() Get the immediate calling class, ignoring MOP frames. |
static Class |
getCallingClass(int matchLevel) Get the called that is matchLevel stack frames before the call, ignoring MOP frames. |
static Class |
getCallingClass(int matchLevel, Collection<String> extraIgnoredPackages) Get the called that is matchLevel stack frames before the call, ignoring MOP frames and desired exclude packages. |
static boolean |
isCallingClassReflectionAvailable() Determine whether or not the getCallingClass methods will return any sensible results. |
Get the immediate calling class, ignoring MOP frames.
Get the called that is matchLevel stack frames before the call, ignoring MOP frames.
matchLevel
- how may call stacks down to look.
If it is less than 1 it is treated as though it was 1.Get the called that is matchLevel stack frames before the call, ignoring MOP frames and desired exclude packages.
matchLevel
- how may call stacks down to look.
If it is less than 1 it is treated as though it was 1.extraIgnoredPackages
- A collection of string names of packages to exclude
in addition to the MOP packages when counting stack frames.Determine whether or not the getCallingClass methods will return any sensible results. On JVMs that are not Sun derived i.e. (gcj, Harmony) this will likely return false. When not available all getCallingClass methods will return null.