本文整理汇总了Java中com.siyeh.ig.fixes.ReplaceInheritanceWithDelegationFix类的典型用法代码示例。如果您正苦于以下问题:Java ReplaceInheritanceWithDelegationFix类的具体用法?Java ReplaceInheritanceWithDelegationFix怎么用?Java ReplaceInheritanceWithDelegationFix使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReplaceInheritanceWithDelegationFix类属于com.siyeh.ig.fixes包,在下文中一共展示了ReplaceInheritanceWithDelegationFix类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildFix
import com.siyeh.ig.fixes.ReplaceInheritanceWithDelegationFix; //导入依赖的package包/类
@Override
protected InspectionGadgetsFix buildFix(Object... infos) {
final PsiClass aClass = (PsiClass)infos[1];
// skip inheritance with delegation for anonymous classes
// or better suggest to replace anonymous with inner and then replace with delegation
if (aClass instanceof PsiAnonymousClass) {
return null;
}
return new ReplaceInheritanceWithDelegationFix();
}
示例2: buildFix
import com.siyeh.ig.fixes.ReplaceInheritanceWithDelegationFix; //导入依赖的package包/类
/**
* @see com.siyeh.ig.inheritance.ExtendsConcreteCollectionInspection#buildFix(java.lang.Object...)
*/
@Override
protected InspectionGadgetsFix buildFix(Object... infos) {
final PsiClass aClass = (PsiClass)infos[0];
if (aClass instanceof PsiAnonymousClass) {
return null;
}
return new ReplaceInheritanceWithDelegationFix();
}
示例3: buildFix
import com.siyeh.ig.fixes.ReplaceInheritanceWithDelegationFix; //导入依赖的package包/类
@Override
protected InspectionGadgetsFix buildFix(Object... infos)
{
final PsiClass aClass = (PsiClass) infos[1];
// skip inheritance with delegation for anonymous classes
// or better suggest to replace anonymous with inner and then replace with delegation
if(aClass instanceof PsiAnonymousClass)
{
return null;
}
return new ReplaceInheritanceWithDelegationFix();
}