Ejemplo n.º 1
0
 public static boolean isStatic(IMember member) throws ModelException {
   if (isNestedInterfaceOrAnnotation(member)) return true;
   if (member.getElementType() != IModelElement.METHOD && isInterfaceOrAnnotationMember(member))
     return true;
   if (isEnumConstant(member)) return true;
   return Flags.isStatic(member.getFlags());
 }
Ejemplo n.º 2
0
 public static boolean isFinal(IMember member) throws ModelException {
   if (isInterfaceOrAnnotationField(member)) return true;
   // if (isAnonymousType(member))
   // return true;
   if (isEnumConstant(member)) return true;
   return Flags.isFinal(member.getFlags());
 }
Ejemplo n.º 3
0
 public static boolean isPublic(IMember member) throws ModelException {
   if (isInterfaceOrAnnotationMember(member)) return true;
   if (isEnumConstant(member)) return true;
   return Flags.isPublic(member.getFlags());
 }
Ejemplo n.º 4
0
 public static boolean isProtected(IMember member) throws ModelException {
   return Flags.isProtected(member.getFlags());
 }
Ejemplo n.º 5
0
 public static boolean isAbstract(IMember member) throws ModelException {
   if (isInterfaceOrAnnotationMethod(member)) return true;
   return Flags.isAbstract(member.getFlags());
 }
Ejemplo n.º 6
0
 private static boolean isEnumConstant(IMember member) throws ModelException {
   return member.getElementType() == IModelElement.FIELD && isEnum(member);
 }
Ejemplo n.º 7
0
 private static boolean isNestedInterfaceOrAnnotation(IMember member) throws ModelException {
   return member.getElementType() == IModelElement.TYPE
       && member.getDeclaringType() != null
       && ScriptModelUtil.isInterfaceOrAnnotation((IType) member);
 }
Ejemplo n.º 8
0
 private static boolean isInterfaceOrAnnotationMember(IMember member) throws ModelException {
   return member.getDeclaringType() != null
       && ScriptModelUtil.isInterfaceOrAnnotation(member.getDeclaringType());
 }
Ejemplo n.º 9
0
 private static boolean isInterfaceOrAnnotationField(IMember member) throws ModelException {
   return member.getElementType() == IModelElement.FIELD && isInterfaceOrAnnotationMember(member);
 }
Ejemplo n.º 10
0
 public static boolean isAnnotation(IMember member) throws ModelException {
   return Flags.isAnnotation(member.getFlags());
 }