Java 类com.intellij.openapi.util.ClassConditionKey 实例源码

项目:intellij-ce-playground    文件:LookupElementDecorator.java   
@Override
public <T> T as(ClassConditionKey<T> conditionKey) {
  final T t = super.as(conditionKey);
  return t == null ? myDelegate.as(conditionKey) : t;
}
项目:intellij-ce-playground    文件:LookupElement.java   
/**
 * use {@link #as(ClassConditionKey)} instead
 */
@Deprecated
@Nullable
public final <T> T as(Class<T> aClass) {
  return as(ClassConditionKey.create(aClass));
}
项目:intellij-ce-playground    文件:LookupElement.java   
@SuppressWarnings("unchecked")
@Nullable
public <T> T as(ClassConditionKey<T> conditionKey) {
  return conditionKey.isInstance(this) ? (T) this : null;
}
项目:tools-idea    文件:LookupElementDecorator.java   
@Override
public <T> T as(ClassConditionKey<T> conditionKey) {
  final T t = super.as(conditionKey);
  return t == null ? myDelegate.as(conditionKey) : t;
}
项目:tools-idea    文件:LookupElement.java   
/**
 * use {@link #as(com.intellij.openapi.util.ClassConditionKey)} instead
 */
@Deprecated
@Nullable
public final <T> T as(Class<T> aClass) {
  return as(ClassConditionKey.create(aClass));
}
项目:tools-idea    文件:LookupElement.java   
@Nullable
public <T> T as(ClassConditionKey<T> conditionKey) {
  return conditionKey.isInstance(this) ? (T) this : null;
}
项目:consulo    文件:LookupElementDecorator.java   
@Override
public <T> T as(ClassConditionKey<T> conditionKey) {
  final T t = super.as(conditionKey);
  return t == null ? myDelegate.as(conditionKey) : t;
}
项目:consulo    文件:LookupElement.java   
/**
 * use {@link #as(com.intellij.openapi.util.ClassConditionKey)} instead
 */
@Deprecated
@Nullable
public final <T> T as(Class<T> aClass) {
  return as(ClassConditionKey.create(aClass));
}
项目:consulo    文件:LookupElement.java   
@Nullable
public <T> T as(ClassConditionKey<T> conditionKey) {
  return conditionKey.isInstance(this) ? (T) this : null;
}