code: public static boolean isAbstract(TypeRef  typeRef) {
          DefinitionRepository repository =  DefinitionRepository.getRepository();
          TypeDef def = repository.getDefinition(typeRef);
          if (def == null && typeRef instanceof ClassRef) {
              def = ((ClassRef)typeRef).getDefinition();
          }
          return def != null ? def.isAbstract() : false;
      }
docs: Checks a {@link TypeRef} is of an abstract type.
  @param   typeRef The type to check.
  @return  True if its an abstract type.