public static boolean isStatic(IMember member) throws JavaModelException{ if (isNestedInterfaceOrAnnotation(member)) return true; if (member.getElementType() != IJavaElement.METHOD && isInterfaceOrAnnotationMember(member)) return true; if (isEnumConstant(member)) return true; return Flags.isStatic(member.getFlags()); }
public static boolean isStatic(BodyDeclaration bodyDeclaration) { if (isNestedInterfaceOrAnnotation(bodyDeclaration)) return true; int nodeType= bodyDeclaration.getNodeType(); if (!(nodeType == ASTNode.METHOD_DECLARATION || nodeType == ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION) && isInterfaceOrAnnotationMember(bodyDeclaration)) return true; if (bodyDeclaration instanceof EnumConstantDeclaration) return true; if (bodyDeclaration instanceof EnumDeclaration && bodyDeclaration.getParent() instanceof AbstractTypeDeclaration) return true; return Modifier.isStatic(bodyDeclaration.getModifiers()); }
public static boolean isStatic(BodyDeclaration bodyDeclaration) { if (isNestedInterfaceOrAnnotation(bodyDeclaration)) return true; int nodeType= bodyDeclaration.getNodeType(); if (!(nodeType == ASTNode.METHOD_DECLARATION || nodeType == ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION) && isInterfaceOrAnnotationMember(bodyDeclaration)) return true; if (bodyDeclaration instanceof EnumConstantDeclaration) return true; if (bodyDeclaration instanceof EnumDeclaration && bodyDeclaration.getParent() instanceof AbstractTypeDeclaration) return true; return Modifier.isStatic(bodyDeclaration.getModifiers()); }
public static boolean isStatic(IMember member) throws JavaModelException { if (isNestedInterfaceOrAnnotation(member)) return true; if (member.getElementType() != IJavaElement.METHOD && isInterfaceOrAnnotationMember(member)) return true; if (isEnum(member) && (member.getElementType() == IJavaElement.FIELD || member.getDeclaringType() != null)) return true; return Flags.isStatic(member.getFlags()); }
public static boolean isStatic(IMember member) throws JavaModelException { if (isNestedInterfaceOrAnnotation(member)) return true; if (member.getElementType() != IJavaElement.METHOD && isInterfaceOrAnnotationMember(member)) return true; if (isEnum(member) && (member.getElementType() == IJavaElement.FIELD || member.getDeclaringType() != null)) return true; return Flags.isStatic(member.getFlags()); }