Get the annotations of this parameter.
Return an empty array if there are none.
183976
public AnnotationDesc[] annotations() {
        AnnotationDesc res[] = new AnnotationDesc[sym.getRawAttributes().length()];
        int i = 0;
        for (Attribute.Compound a : sym.getRawAttributes()) {
            res[i++] = new AnnotationDescImpl(env, a);
        }
        return res;
    }
263169
public function annotationVars(): array
    {
        // e.g: `more info see {name}:index`
        return [
            // 'name' => self::getName(),
            // 'group' => self::getName(),
            'workDir' => input()->getPwd(),
            'script' => input()->getScript(), // bin/app
            'command' => input()->getCommand(), // demo OR home:test
            'fullCommand' => input()->getScript() . ' ' . input()->getCommand(),
        ];
    }
1263821
protected List<Parameter> getParameters(Type type, List<Annotation> annotations, Set<Type> typesToSkip) {
        if (!hasValidAnnotations(annotations) || isApiParamHidden(annotations)) {
            return Collections.emptyList();
        }

        Iterator<SwaggerExtension> chain = SwaggerExtensions.chain();
        List<Parameter> parameters = new ArrayList<>();
        Class<?> cls = TypeUtils.getRawType(type, type);
        LOG.debug("Looking for path/query/header/form/cookie params in " + cls);

        if (chain.hasNext()) {
            SwaggerExtension extension = chain.next();
            LOG.debug("trying extension " + extension);
            parameters = extension.extractParameters(annotations, type, typesToSkip, chain);
        }

        if (!parameters.isEmpty()) {
            for (Parameter parameter : parameters) {
                ParameterProcessor.applyAnnotations(swagger, parameter, type, annotations);
            }
        } else {
            LOG.debug("Looking for body params in " + cls);
            // parameters is guaranteed to be empty at this point, replace it with a mutable collection
            parameters = Lists.newArrayList();
            if (!typesToSkip.contains(type)) {
                Parameter param = ParameterProcessor.applyAnnotations(swagger, null, type, annotations);
                if (param != null) {
                    parameters.add(param);
                }
            }
        }
        return parameters;
    }
45264
def get_annotation(self, id_):
        """"""
        endpoint = "annotations/{id}".format(id=id_)
        return self._make_request(endpoint)
1212610
@SuppressWarnings("unchecked")
    public <T extends Annotation> T getParameterAnnotation(Class<T> annotationType) {
        Annotation[] anns = getParameterAnnotations();
        for (Annotation ann : anns) {
            if (annotationType.isInstance(ann)) {
                return (T) ann;
            }
        }
        return null;
    }
944215
public AnnotationType[] getAnnotationTypes() {
      if (annotationType.isEmpty()) {
         return new AnnotationType[]{Types.TOKEN};
      }
      return annotationType.toArray(new AnnotationType[annotationType.size()]);
   }
756708
def get_tid2annotations(self, clean:bool=True):
        '''  '''
        tid2annotations = defaultdict(list)
        header = ['Index'] + list(self.fetch_annotations().columns)
        for row in self.fetch_annotations().itertuples():
            row = {header[i]:val for i, val in enumerate(row)}
            if clean:
                annotation = {
                    'tid': row['tid'],
                    'annotation_type_tid': row['annotation_type_tid'],
                    'value': row['value'],
                    'annotation_type_label': row['annotation_type_label'],
                }
                tid2annotations[row['tid']].append(annotation)
            elif not clean:
                tid2annotations[row['tid']].append(row)
        return tid2annotations
26442
def get_annotations(fname, prefix=None):
    ""
    annot_dict = json.load(open(fname))
    id2images, id2bboxes, id2cats = {}, collections.defaultdict(list), collections.defaultdict(list)
    classes = {}
    for o in annot_dict['categories']:
        classes[o['id']] = o['name']
    for o in annot_dict['annotations']:
        bb = o['bbox']
        id2bboxes[o['image_id']].append([bb[1],bb[0], bb[3]+bb[1], bb[2]+bb[0]])
        id2cats[o['image_id']].append(classes[o['category_id']])
    for o in annot_dict['images']:
        if o['id'] in id2bboxes:
            id2images[o['id']] = ifnone(prefix, '') + o['file_name']
    ids = list(id2images.keys())
    return [id2images[k] for k in ids], [[id2bboxes[k], id2cats[k]] for k in ids]
636902
@SuppressWarnings("unchecked")
	public List<MethodParameter> getParametersWith(Class<? extends Annotation> annotation) {

		Assert.notNull(annotation, "Annotation must not be null!");

		return parametersWithAnnotationCache.computeIfAbsent(annotation, key -> {

			return getParameters().stream()//
					.filter(it -> it.hasParameterAnnotation((Class<? extends Annotation>) key))//
					.collect(Collectors.toList());
		});
	}
693896
def extract_pathvars(callback):
    '''
    '''
    mandatory = []
    optional = []
    # We loop on the signature because the order of the parameters is
    # important, and signature is an OrderedDict, while annotations is a
    # regular dictionary
    for pname in callback.signature.parameters.keys():
        try:
            anno = callback.__annotations__[pname]
        except KeyError:  # unannotated params, like "cls" or "request"
            continue
        if anno[0] != Ptypes.path:
            continue
        # At this point we are only considering path variables, but
        # we have to generate different (present/absent) if these
        # parameters have a default.
        if callback.signature.parameters[pname].default == inspect._empty:
            mandatory.append(pname)
        else:
            optional.append(pname)
    return {'mandatory': mandatory, 'optional': optional}
1089113
public function getClassAnnotations()
    {
        if (empty($this->_annotations['class'])) {
            $comment = $this->_getReflection()->getDocComment();
            $data = AnnotationParser::getAnnotations($comment);
            $classAnnotations = new AnnotationsList();
            foreach ($data as $name => $parsedData) {
                $classAnnotations->append(
                    $this->_createAnnotation($name, $parsedData)
                );
            }
            $this->_annotations['class'] = $classAnnotations;
        }
        return $this->_annotations['class'];
    }
209314
public Set<Method> getMethodsAnnotatedWith(final Class<? extends Annotation> annotation) {
        Iterable<String> methods = store.get(index(MethodAnnotationsScanner.class), annotation.getName());
        return getMethodsFromDescriptors(methods, loaders());
    }
330006
@SuppressWarnings("unchecked")
    public Collection<TopicAnnotation> getTopicAnnotations() {
        Collection<? extends Enhancement> result = enhancements.get(TopicAnnotation.class);
        return result == null ? Collections.<TopicAnnotation>emptySet() : 
            Collections.unmodifiableCollection((Collection<TopicAnnotation>) result);
    }
393026
def annotations(self, qname=True):
        
        if qname:
            return sorted([(uri2niceString(x, self.namespaces)
                            ), (uri2niceString(y, self.namespaces)), z]
                          for x, y, z in self.triples)
        else:
            return sorted(self.triples)
838369
public List<String> getAccessorAnnotationDescriptors() {
        if (mAnnotationDescs == null) {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(mAnnotationDescs);
    }
1242031
public Collection<Parameter<?>> getParameters() {
        if (_parameters == null) {
            return Collections.<Parameter<?>>emptyList();
        }
        
        return Collections.unmodifiableCollection(_parameters);
    }
810554
public Set<Annotation> getPropertyAnnotations()
	{
		if (accessor instanceof PropertyAwareAccessor)
		{
			return unmodifiableSet(((PropertyAwareAccessor) accessor).getReadMethodAnnotations());
		}
		return unmodifiableSet(Collections.<Annotation>emptySet());
	}