18b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey/* 28b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * Copyright (C) 2012 The Android Open Source Project 38b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * 48b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * Licensed under the Apache License, Version 2.0 (the "License"); 58b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * you may not use this file except in compliance with the License. 68b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * You may obtain a copy of the License at 78b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * 88b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * http://www.apache.org/licenses/LICENSE-2.0 98b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * 108b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * Unless required by applicable law or agreed to in writing, software 118b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * distributed under the License is distributed on an "AS IS" BASIS, 128b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 138b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * See the License for the specific language governing permissions and 148b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * limitations under the License. 158b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey */ 168b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey 178b2c3a14603d163d7564e6f60286995079687690Jeff Sharkeypackage com.android.internal.annotations; 188b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey 198b2c3a14603d163d7564e6f60286995079687690Jeff Sharkeyimport java.lang.annotation.ElementType; 208b2c3a14603d163d7564e6f60286995079687690Jeff Sharkeyimport java.lang.annotation.Retention; 218b2c3a14603d163d7564e6f60286995079687690Jeff Sharkeyimport java.lang.annotation.RetentionPolicy; 228b2c3a14603d163d7564e6f60286995079687690Jeff Sharkeyimport java.lang.annotation.Target; 238b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey 248b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey/** 258b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * Annotation type used to mark a method or field that can only be accessed when 268b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey * holding the referenced lock. 278b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey */ 288b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey@Target({ ElementType.FIELD, ElementType.METHOD }) 298b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey@Retention(RetentionPolicy.CLASS) 308b2c3a14603d163d7564e6f60286995079687690Jeff Sharkeypublic @interface GuardedBy { 318b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey String value(); 328b2c3a14603d163d7564e6f60286995079687690Jeff Sharkey} 33