private void checkIsCorrectClass(){
  if (checkIsSubClass(ACT_NAME)) {
    type=ElementType.ACTTIVITY;
  }
 else   if (checkIsSubClass(FRAG_NAME) || checkIsSubClass(V4_FRAG_NAME)) {
    type=ElementType.FRAGMENT;
  }
 else {
    throw new IllegalArgumentException(String.format("class %s must be extends from %s or %s or %s",element.getQualifiedName(),ACT_NAME,FRAG_NAME,V4_FRAG_NAME));
  }
}

private void checkIsCorrectClass ( ) { if ( checkIsSubClass ( ACT_NAME ) ) { type = ElementType . ACTTIVITY ; } else if ( checkIsSubClass ( FRAG_NAME ) || checkIsSubClass ( V4_FRAG_NAME ) ) { type = ElementType . FRAGMENT ; } else { throw new IllegalArgumentException ( String . format ( "class %s must be extends from %s or %s or %s" , element . getQualifiedName ( ) , ACT_NAME , FRAG_NAME , V4_FRAG_NAME ) ) ; } }
check out if is extends from activity or fragment
