本文整理汇总了Java中com.siyeh.ig.psiutils.SerializationUtils.hasWriteObject方法的典型用法代码示例。如果您正苦于以下问题:Java SerializationUtils.hasWriteObject方法的具体用法?Java SerializationUtils.hasWriteObject怎么用?Java SerializationUtils.hasWriteObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.siyeh.ig.psiutils.SerializationUtils
的用法示例。
在下文中一共展示了SerializationUtils.hasWriteObject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitClass
import com.siyeh.ig.psiutils.SerializationUtils; //导入方法依赖的package包/类
@Override
public void visitClass(@NotNull PsiClass aClass) {
// no call to super, so it doesn't drill down
if (aClass.isInterface() || aClass.isAnnotationType()) {
return;
}
if (!SerializationUtils.isExternalizable(aClass)) {
return;
}
final boolean hasReadObject =
SerializationUtils.hasReadObject(aClass);
final boolean hasWriteObject =
SerializationUtils.hasWriteObject(aClass);
if (!hasWriteObject && !hasReadObject) {
return;
}
registerClassError(aClass, Boolean.valueOf(hasReadObject),
Boolean.valueOf(hasWriteObject));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ExternalizableWithSerializationMethodsInspection.java
示例2: visitClass
import com.siyeh.ig.psiutils.SerializationUtils; //导入方法依赖的package包/类
@Override
public void visitClass(@NotNull PsiClass aClass) {
// no call to super, so it doesn't drill down
if (aClass.isInterface() || aClass.isAnnotationType()) {
return;
}
final boolean hasReadObject =
SerializationUtils.hasReadObject(aClass);
final boolean hasWriteObject =
SerializationUtils.hasWriteObject(aClass);
if (!hasWriteObject && !hasReadObject) {
return;
}
if (SerializationUtils.isSerializable(aClass)) {
return;
}
registerClassError(aClass, Boolean.valueOf(hasReadObject),
Boolean.valueOf(hasWriteObject), aClass);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:NonSerializableWithSerializationMethodsInspection.java
示例3: visitField
import com.siyeh.ig.psiutils.SerializationUtils; //导入方法依赖的package包/类
@Override
public void visitField(@NotNull PsiField field) {
if (field.hasModifierProperty(PsiModifier.TRANSIENT) || field.hasModifierProperty(PsiModifier.STATIC)) {
return;
}
final PsiClass aClass = field.getContainingClass();
if (aClass == null) {
return;
}
if (ignoreAnonymousInnerClasses && aClass instanceof PsiAnonymousClass) {
return;
}
if (!SerializationUtils.isSerializable(aClass)) {
return;
}
if (SerializationUtils.isProbablySerializable(field.getType())) {
return;
}
final boolean hasWriteObject = SerializationUtils.hasWriteObject(aClass);
if (hasWriteObject) {
return;
}
if (isIgnoredSubclass(aClass)) {
return;
}
if (AnnotationUtil.isAnnotated(field, ignorableAnnotations)) {
return;
}
registerFieldError(field, field);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:NonSerializableFieldInSerializableClassInspectionBase.java
示例4: visitClass
import com.siyeh.ig.psiutils.SerializationUtils; //导入方法依赖的package包/类
@Override
public void visitClass(@NotNull PsiClass aClass) {
if (aClass.isInterface() || aClass.isAnnotationType()) {
return;
}
final boolean hasReadObject = SerializationUtils.hasReadObject(aClass);
final boolean hasWriteObject = SerializationUtils.hasWriteObject(aClass);
if (!hasWriteObject && !hasReadObject) {
return;
}
if (SerializationUtils.isSerializable(aClass)) {
return;
}
registerClassError(aClass, Boolean.valueOf(hasReadObject), Boolean.valueOf(hasWriteObject), aClass);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:NonSerializableWithSerializationMethodsInspection.java
示例5: visitClass
import com.siyeh.ig.psiutils.SerializationUtils; //导入方法依赖的package包/类
@Override
public void visitClass(@NotNull PsiClass aClass) {
// no call to super, so it doesn't drill down
if (aClass.isInterface() || aClass.isAnnotationType() ||
aClass.isEnum()) {
return;
}
if (aClass instanceof PsiTypeParameter ||
aClass instanceof PsiEnumConstantInitializer) {
return;
}
if (ignoreAnonymousInnerClasses &&
aClass instanceof PsiAnonymousClass) {
return;
}
if (!SerializationUtils.isSerializable(aClass)) {
return;
}
final boolean hasReadObject =
SerializationUtils.hasReadObject(aClass);
final boolean hasWriteObject =
SerializationUtils.hasWriteObject(aClass);
if (hasWriteObject && hasReadObject) {
return;
}
if (isIgnoredSubclass(aClass)) {
return;
}
registerClassError(aClass, Boolean.valueOf(hasReadObject),
Boolean.valueOf(hasWriteObject));
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:32,代码来源:SerializableHasSerializationMethodsInspection.java
示例6: visitClass
import com.siyeh.ig.psiutils.SerializationUtils; //导入方法依赖的package包/类
@Override
public void visitClass(@NotNull PsiClass aClass) {
// no call to super, so it doesn't drill down
if (aClass.isInterface() || aClass.isAnnotationType() ||
aClass.isEnum()) {
return;
}
if (aClass instanceof PsiTypeParameter ||
aClass instanceof PsiEnumConstantInitializer) {
return;
}
if (ignoreAnonymousInnerClasses &&
aClass instanceof PsiAnonymousClass) {
return;
}
if (!SerializationUtils.isSerializable(aClass)) {
return;
}
final boolean hasReadObject =
SerializationUtils.hasReadObject(aClass);
final boolean hasWriteObject =
SerializationUtils.hasWriteObject(aClass);
if (hasWriteObject && hasReadObject) {
return;
}
if (isIgnoredSubclass(aClass)) {
return;
}
if (ignoreClassWithoutFields) {
final PsiField[] fields = aClass.getFields();
boolean hasField = false;
for (PsiField field : fields) {
if (field.hasModifierProperty(PsiModifier.STATIC)) {
continue;
}
hasField = true;
break;
}
if (!hasField) {
return;
}
}
registerClassError(aClass, Boolean.valueOf(hasReadObject),
Boolean.valueOf(hasWriteObject));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:46,代码来源:SerializableHasSerializationMethodsInspectionBase.java