Register globally ignored annotations
433295
protected function registerGlobalIgnoredAnnotations()
    {
        // There is a bug in the Doctrine annotation DocParser class. 
        // If there's a class named the same as an annotation, an exeption will be raised. 
        // In the case of Concrete5 this is the \@package annotaton. Even though 
        // the addGlobalIgnoredName is set the exception is still thrown.
        // http://stackoverflow.com/questions/21609571/swagger-php-and-doctrine-annotation-issue
        // Solution 1: Add this fix to \Doctrine\Common\Annotations\DocParser and customize other Classes
        // https://github.com/bfanger/annotations/commit/1dfb5073061d3fe856c3b138286aa4c75120fcd3 
        // Solution 2: Comment all [at]package annotation found in concrete/src with a backslash. Example \@package
        // The annotations added to the global ignored namespace are still valid for the simple annotation reader
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('subpackages');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('package');

        // Default Doctrine annotations
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Column');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('ColumnResult');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Cache');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('ChangeTrackingPolicy');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('DiscriminatorColumn');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('DiscriminatorMap');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Entity');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('EntityResult');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('FieldResult');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('GeneratedValue');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('HasLifecycleCallbacks');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Id');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('InheritanceType');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('JoinColumn');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('JoinColumns');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('JoinTable');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('ManyToOne');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('ManyToMany');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('MappedSuperclass');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('NamedNativeQuery');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('OneToOne');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('OneToMany');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('OrderBy');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('PostLoad');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('PostPersist');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('PostRemove');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('PostUpdate');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('PrePersist');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('PreRemove');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('PreUpdate');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('SequenceGenerator');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('SqlResultSetMapping');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Table');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('UniqueConstraint');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Version');

        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Embeddable');
        \Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('Embedded');
    }
1130290
public void setIgnore(Collection<Class<? extends Throwable>> ignore) {
        FailureInterpreter fi = getFailureInterpreter();
        if (!(fi instanceof DefaultFailureInterpreter)) {
            throw new IllegalStateException("setIgnore() not supported: this CircuitBreaker's FailureInterpreter isn't a DefaultFailureInterpreter.");
        }

        @SuppressWarnings("unchecked")
        Class<? extends Throwable>[] classes = new Class[ignore.size()];
        int i = 0;
        for(Class<? extends Throwable> c : ignore) {
            classes[i] = c;
            i++;
        }
        ((DefaultFailureInterpreter)fi).setIgnore(classes);
    }
1011284
def handler_all(func=None):
	
	if not func:
		return functools.partial(handler_all)

	registrations_global.append(func)

	return func
1177603
def hasannotation(self,Class,set=None):
        """"""
        return self.count(Class,set,True,default_ignore_annotations)
53357
public synchronized void setIgnore(Class<? extends Throwable>[] ignore) {
        this.ignore = new HashSet<Class<? extends Throwable>>(Arrays.asList(ignore));
    }
97903
private void putDefaultCallback(CallbackType callbackType, CallbackMetadata metadata) {
    List<CallbackMetadata> metadataList = globalCallbacks.get(callbackType);
    if (metadataList == null) {
      metadataList = new ArrayList<>();
      globalCallbacks.put(callbackType, metadataList);
    }
    metadataList.add(metadata);
  }
992770
def resolve_annotations(raw_annotations: Dict[str, AnyType], module_name: Optional[str]) -> Dict[str, AnyType]:
    
    if module_name:
        base_globals: Optional[Dict[str, Any]] = sys.modules[module_name].__dict__
    else:
        base_globals = None
    annotations = {}
    for name, value in raw_annotations.items():
        if isinstance(value, str):
            value = ForwardRef(value, is_argument=False)
        try:
            value = _eval_type(value, base_globals, None)
        except NameError:
            # this is ok, it can be fixed with update_forward_refs
            pass
        annotations[name] = value
    return annotations
321372
def _set_global_defaults(xmlglobals):
    """"""
    for key, val in xmlglobals.items():
        if key != "defaults":
            for name, tag in val.items():
                _update_from_globals(tag, xmlglobals, None)
429368
def get_memory_annotations(cls, exclude=None):
        

        result = set()

        # get global dictionary
        annotations_in_memory = Annotation.__ANNOTATIONS_IN_MEMORY__

        exclude = () if exclude is None else exclude

        # iterate on annotation classes
        for annotation_cls in annotations_in_memory:

            # if annotation class is excluded, continue
            if issubclass(annotation_cls, exclude):
                continue

            # if annotation class inherits from self, add it in the result
            if issubclass(annotation_cls, cls):
                result |= annotations_in_memory[annotation_cls]

        return result
1178433
public void registerFilters() {
        if (Clz.classExists("org.n3r.eql.eqler.annotations.Eqler")) {
            addExcludeFilter(new AnnotationTypeFilter(Eqler.class));
            addExcludeFilter(new AnnotationTypeFilter(EqlerConfig.class));
        }

        addIncludeFilter((metadataReader, metadataReaderFactory) -> {
            val metadata = metadataReader.getClassMetadata();
            if (!metadata.isInterface()) return false;

            val className = metadata.getClassName();
            val clazz = Clz.forName(className);
            return Anns.isFastWestCacheAnnotated(clazz);
        });

    }
785653
private void registerExternalLoaders() throws MojoExecutionException {
        if (archiveLoaders != null) {
            for (String entry : archiveLoaders) {
                try {
                    SourceLoader loader = (SourceLoader) Class.forName(entry).newInstance();
                    registerLoader(loader);
                } catch (Exception e) {
                    throw new MojoExecutionException("Error registering archive loader for class: " + entry, e);
                }
            }
        }
    }
315171
def set_global_defaults(**kwargs):
    """"""

    valid_options = [
        'active', 'selected', 'disabled', 'on', 'off',
        'on_active', 'on_selected', 'on_disabled',
        'off_active', 'off_selected', 'off_disabled',
        'color', 'color_on', 'color_off',
        'color_active', 'color_selected', 'color_disabled',
        'color_on_selected', 'color_on_active', 'color_on_disabled',
        'color_off_selected', 'color_off_active', 'color_off_disabled',
        'animation', 'offset', 'scale_factor',
        ]

    for kw in kwargs:
        if kw in valid_options:
            _default_options[kw] = kwargs[kw]
        else:
            error = "Invalid option '{0}'".format(kw)
            raise KeyError(error)
1244823
function ignoredMetas(cfgs, metas){
	cfgs = cfgs || {};
	Object.keys(metas).forEach(function(name){
		var cfg = metas[name];
		if(cfg && cfg.bundle === false) {
			cfgs[name] = cfg;
		}
	});
	return { meta: cfgs };
}
675945
@Override
    @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = { "NP_UNWRITTEN_FIELD", "UWF_UNWRITTEN_FIELD" }, justification = "Private fields set by Maven.")
    @SuppressWarnings("PMD.UselessParentheses")
    public void execute() throws MojoExecutionException {

        addProjectDependenciesToClasspath();

        try {
            getAnnotationStyle();
        } catch (IllegalArgumentException e) {
            throw new MojoExecutionException("Not a valid annotation style: " + annotationStyle);
        }

        try {
            new AnnotatorFactory(this).getAnnotator(getCustomAnnotator());
        } catch (IllegalArgumentException e) {
            throw new MojoExecutionException(e.getMessage(), e);
        }

        if (skip) {
            return;
        }

        // verify source directories
        if (sourceDirectory != null) {
            sourceDirectory = FilenameUtils.normalize(sourceDirectory);
            // verify sourceDirectory
            try {
                URLUtil.parseURL(sourceDirectory);
            } catch (IllegalArgumentException e) {
                throw new MojoExecutionException(e.getMessage(), e);
            }
        } else if (!isEmpty(sourcePaths)) {
            // verify individual source paths
            for (int i = 0; i < sourcePaths.length; i++) {
                sourcePaths[i] = FilenameUtils.normalize(sourcePaths[i]);
                try {
                    URLUtil.parseURL(sourcePaths[i]);
                } catch (IllegalArgumentException e) {
                    throw new MojoExecutionException(e.getMessage(), e);
                }
            }
        } else {
            throw new MojoExecutionException("One of sourceDirectory or sourcePaths must be provided");
        }

        if (filteringEnabled() || (sourceDirectory != null && isEmpty(sourcePaths))) {

            if (sourceDirectory == null) {
                throw new MojoExecutionException("Source includes and excludes require the sourceDirectory property");
            }

            if (!isEmpty(sourcePaths)) {
                throw new MojoExecutionException("Source includes and excludes are incompatible with the sourcePaths property");
            }

            fileFilter = createFileFilter();
        }

        if (addCompileSourceRoot) {
            project.addCompileSourceRoot(outputDirectory.getPath());
        }

        if (useCommonsLang3) {
            getLog().warn("useCommonsLang3 is deprecated. Please remove it from your config.");
        }

        try {
            Jsonschema2Pojo.generate(this);
        } catch (IOException e) {
            throw new MojoExecutionException("Error generating classes from JSON Schema file(s) " + sourceDirectory, e);
        }

    }
885175
@SuppressWarnings({"rawtypes", "unchecked"})
	private static void loadAnnotationHandlers(HandlerLibrary lib, Trees trees) throws IOException {
		//No, that seemingly superfluous reference to JavacAnnotationHandler's classloader is not in fact superfluous!
		for (JavacAnnotationHandler handler : SpiLoadUtil.findServices(JavacAnnotationHandler.class, JavacAnnotationHandler.class.getClassLoader())) {
			handler.setTrees(trees);
			Class<? extends Annotation> annotationClass = handler.getAnnotationHandledByThisHandler();
			AnnotationHandlerContainer<?> container = new AnnotationHandlerContainer(handler, annotationClass);
			String annotationClassName = container.annotationClass.getName().replace("$", ".");
			List<AnnotationHandlerContainer<?>> list = lib.annotationHandlers.get(annotationClassName);
			if (list == null) lib.annotationHandlers.put(annotationClassName, list = new ArrayList<AnnotationHandlerContainer<?>>(1));
			list.add(container);
			lib.typeLibrary.addType(container.annotationClass.getName());
		}
	}
361814
public void registerAllAddOns(IdentifiableSet<AddOnModel> addOns) {
        initAddOns(addOns);
        createAddOnInfos(addOns);
        List<CompletableFuture<Void>> futures = addOns.stream()
                .map(addOn -> submit((Runnable) addOn::register))
                .collect(Collectors.toList());
        try {
            timeOut(futures, 30000);
        } catch (InterruptedException e) {
            debug("interrupted while trying to time out the addOns", e);
        }
    }
1336372
protected void validateConsumes(Collection<String> fathomContentTypes) {
        Set<String> ignoreConsumes = new TreeSet<>();
        ignoreConsumes.add(Consumes.ALL);

        // these are handled by the TemplateEngine
        ignoreConsumes.add(Consumes.HTML);
        ignoreConsumes.add(Consumes.XHTML);

        // these are handled by the Servlet layer
        ignoreConsumes.add(Consumes.FORM);
        ignoreConsumes.add(Consumes.MULTIPART);

        for (String declaredConsume : declaredConsumes) {
            if (ignoreConsumes.contains(declaredConsume)) {
                continue;
            }

            String consume = declaredConsume;
            int fuzz = consume.indexOf('*');
            if (fuzz > -1) {
                // strip fuzz, we must have a registered engine for the unfuzzed content-type
                consume = consume.substring(0, fuzz);
            }

            if (!fathomContentTypes.contains(consume)) {
                if (consume.equals(declaredConsume)) {
                    throw new FatalException("{} declares @{}(\"{}\") but there is no registered ContentTypeEngine for that type!",
                            Util.toString(method), Consumes.class.getSimpleName(), declaredConsume);
                } else {
                    throw new FatalException("{} declares @{}(\"{}\") but there is no registered ContentTypeEngine for \"{}\"!",
                            Util.toString(method), Consumes.class.getSimpleName(), declaredConsume, consume);
                }
            }
        }
    }