Gets the default externs set.

Adapted from {@link CommandLineRunner}.
774574
private List<SourceFile> getBuiltinExterns(CompilerOptions options) {
    try {
      return CommandLineRunner.getBuiltinExterns(options.getEnvironment());
    } catch (IOException e) {
      throw new BuildException(e);
    }
  }
534749
public Set<String> getIncludeRoots() {

        List<String> pathList = new ArrayList<String>(m_includes);
        Set<String> includeRoots = new HashSet<String>();
        Collections.sort(pathList);
        while (!pathList.isEmpty()) {
            Iterator<String> iterator = pathList.iterator();
            String firstPath = iterator.next();
            includeRoots.add(firstPath);
            iterator.remove();
            while (iterator.hasNext()) {
                String currentPath = iterator.next();
                if (CmsStringUtil.isPrefixPath(firstPath, currentPath)) {
                    iterator.remove();
                }
            }
        }
        return includeRoots;
    }
1211748
static List<ServletContextListener> getDefaultOtherListeners() {
    try{
      Class<ServletContextListener> introspectorCleanupListenerClass = 
          (Class<ServletContextListener>) Class.forName("org.springframework.web.util.IntrospectorCleanupListener");
      return singletonList(introspectorCleanupListenerClass.newInstance());
    }
    catch (ClassNotFoundException e) {
      // Ignore silently - Spring not present on classpath
    }
    catch(Exception e){
      e.printStackTrace(System.err);
    }
    return emptyList();
  }
35601
public Set<S> getMatchedDeclarationBinder() {
        Set<S> bindedSet = new HashSet<S>();
        for (Map.Entry<ServiceReference<S>, BinderDescriptor> e : declarationBinders.entrySet()) {
            if (e.getValue().match) {
                bindedSet.add(getDeclarationBinder(e.getKey()));
            }
        }
        return bindedSet;
    }
1269890
protected function getDefaultCommands()
    {

        $shell = new Shell(dirname(VENDOR_PATH));

        $handlers = [
            'source' => new Handler\Source($shell),
            'coverage' => new Handler\Coverage(),
            'pdepend' => new Handler\PDepend($shell),
            'dependencies' => new Handler\Dependencies($shell),
            'phpmd' => new Handler\PHPMD($shell),
            'checkstyle' => new Handler\Checkstyle($shell),
            'tests' => new Handler\Tests(),
            'cpd' => new Handler\CPD($shell),
            'phploc' => new Handler\Phploc($shell),
            'git' => new Handler\Git($shell),
            'gitDetailed' => new Handler\GitDetailed($shell),
        ];

        return array_merge(
            parent::getDefaultCommands(),
            [
                new Command\Serve(),
                new Command\Bundle(),
                new Command\Analyze($handlers),
                new Command\Analyzers($handlers),
            ]
        );
    }
390333
public static List<String> getDefaultOOoOptions() {

        ArrayList<String> options = new ArrayList<String>();

        options.add("-nologo");
        options.add("-nodefault");
        options.add("-norestore");
        options.add("-nocrashreport");
        options.add("-nolockcheck");
        options.add("-nofirststartwizard");
        options.add("-headless");

        return options;
    }
626712
public static ArrayList<ConfigSource> getDefaultSources(ClassLoader classloader) {
        ArrayList<ConfigSource> sources = new ArrayList<>();

        sources.add(new SystemConfigSource());
        sources.add(new EnvConfigSource());

        sources.addAll(getPropertiesFileConfigSources(classloader));

        return sources;
    }
1374691
public MapperConfig[] getDefault() {

        MapperConfig executionStatsMapper = new MapperConfig();
        executionStatsMapper.setMapperClass("net.anotheria.extensions.php.mappers.impl.ExecutionStatsMapper");
        executionStatsMapper.setMapperId("ExecutionStatsMapper");

        MapperConfig serviceStatsMapper = new MapperConfig();
        serviceStatsMapper.setMapperClass("net.anotheria.extensions.php.mappers.impl.ServiceStatsMapper");
        serviceStatsMapper.setMapperId("ServiceStatsMapper");

        MapperConfig counterStatsMapper = new MapperConfig();
        counterStatsMapper.setMapperClass("net.anotheria.extensions.php.mappers.impl.CounterStatsMapper");
        counterStatsMapper.setMapperId("CounterStatsMapper");

        return new MapperConfig[]{
                executionStatsMapper, serviceStatsMapper, counterStatsMapper
        };

    }
336282
private ArrayList<AptPropertySet> initPropertySets()
    {
        ArrayList<AptPropertySet> propSets = new ArrayList<AptPropertySet>();

        if ( _intfDecl == null )
            return propSets;

        // TODO: enforce presence of prefixes when multiple property sets w/ the same
        // property name exist

        //
        // Add the intrinsic/base property set
        //

        TypeDeclaration basePropsDecl =
            _ap.getAnnotationProcessorEnvironment().getTypeDeclaration( "org.apache.beehive.controls.api.properties.BaseProperties" );
        if ( basePropsDecl != null )
        {
            propSets.add( new AptPropertySet( null, basePropsDecl, _ap ) );
        }

        //
        // Add external property sets
        //
        ExternalPropertySets extPropsAnnotation = _intfDecl.getAnnotation(ExternalPropertySets.class);
        if ( extPropsAnnotation != null )
        {
            if (isExtension())
            {
                _ap.printError( _intfDecl, "extpropertyset.illegal.usage" );
            }

            try
            {
                Class[] extProps = extPropsAnnotation.value();
            }
            catch ( MirroredTypesException mte )
            {
                Collection<String> extProps = mte.getQualifiedNames();
                for ( String extPropName : extProps )
                {
                    TypeDeclaration extPropDecl = _ap.getAnnotationProcessorEnvironment().getTypeDeclaration( extPropName );
                    if ( extPropDecl != null )
                    {
                        AptPropertySet extPropSet = new AptPropertySet( null, extPropDecl, _ap );
                        propSets.add( extPropSet );
                    }
                    else
                    {
                        _ap.printError( _intfDecl, "extpropertyset.type.not.found", extPropName );
                    }
                }
            }
        }

        //
        // Add nested property sets
        //

        if ( _intfDecl.getNestedTypes() == null )
            return propSets;

        for (TypeDeclaration innerDecl : _intfDecl.getNestedTypes())
        {
            boolean fError = false;
            if (innerDecl.getAnnotation(PropertySet.class) != null)
            {
                if (! (innerDecl instanceof AnnotationTypeDeclaration))
                {
                    _ap.printError( innerDecl, "propertyset.not.annotation.type" );
                    fError = true;
                }

                Retention ret = innerDecl.getAnnotation(Retention.class);
                if (ret == null || ret.value() != RetentionPolicy.RUNTIME)
                {
                    _ap.printError( innerDecl, "propertyset.missing.retention" );
                    fError = true;
                }

                if (isExtension())
                {
                    _ap.printError( innerDecl, "propertyset.illegal.usage.2" );
                    fError = true;
                }

                if ( !fError )
                    propSets.add(
                        new AptPropertySet(this, (AnnotationTypeDeclaration)innerDecl, _ap));
            }
        }

        //
        // Detect the presence of locally declared bound or constrained properties
        // Enforce property name (including prefix) uniqueness across all propertysets on this interface.
        //

        Set<String> propertyNames = new HashSet<String>();

        for (AptPropertySet propSet : propSets)
        {
            for (AptProperty prop : propSet.getProperties())
            {
                if (prop.isBound())
                    _hasBoundProperties = true;

                if (prop.isConstrained())
                    _hasConstrainedProperties = true;

                String propName = prop.getAccessorName();

                if ( propertyNames.contains( propName ) )
                {
                    _ap.printError( _intfDecl, "propertyset.duplicate.property.names", propName, propSet.getShortName() );
                }
                else
                {
                    propertyNames.add( propName );
                }
            }
        }

        return propSets;
    }
480548
private static Properties getWindowsShellVariables()
        throws EnvironmentException
    {
        Properties properties = new Properties();
        // build the command based on the shell used: cmd.exe or command.com
        StringBuffer buffer = new StringBuffer( getWindowsUserShell() );
        buffer.append( " /C SET" );
        String cmdExec = buffer.toString();

        int exitValue = readEnvironment( cmdExec, properties );
        if( 0 != exitValue )
        {
            String message = "Environment process failed with non-zero exit code of " + exitValue;
            throw new EnvironmentException( message );
        }

        return properties;
    }
1265361
protected CommandLine getDotCommandLine(Set<String> generatedFiles)
			throws MojoExecutionException {
		CommandLine cl = new CommandLine(command);
		if (isVerbose()) {
			cl.addArgument("-v");
		}
		cl.addArgument("-Tpng");
		cl.addArgument("-O");
		for (String generatedFile : generatedFiles) {
			if (generatedFile.endsWith(".dot")) {
				cl.addArgument(generatedFile);
			}
		}
		if (isVerbose()) {
			getLog().info("Commandline: " + cl);
		}
		return cl;
	}
282837
public void applyDefaults(final char commandPrefix, final List<ICmdLineArg<?>> allKnownArgs)
    {
        for (final String argNameToReset : getValues())
        {
            if (argNameToReset == null)
                return;

            Token token = null;
            if (argNameToReset.trim().length() == 1)
                token = new Token(commandPrefix, commandPrefix + argNameToReset);
            else
                token = new Token(commandPrefix, "" + commandPrefix + commandPrefix + argNameToReset);

            final List<ICmdLineArg<?>> bestArgs = new ArrayList<>();
            CmdLine.matchingArgs(bestArgs, allKnownArgs, token, true);
            if (bestArgs.isEmpty())
                return;

            final ICmdLineArg<?> target = bestArgs.get(0);
            target.useDefaults();
        }
    }
972761
public static Set<String> getJavaDefaultTypes() {
		if (javaDefaultTypes == null) {
			Set<String> result = new HashSet<String>(125);
			result.add("AbstractMethodError");
			result.add("Appendable");
			result.add("ArithmeticException");
			result.add("ArrayIndexOutOfBoundsException");
			result.add("ArrayStoreException");
			result.add("AssertionError");
			result.add("AutoCloseable");
			result.add("Boolean");
			result.add("BootstrapMethodError");
			result.add("Byte");
			result.add("Character");
			result.add("CharSequence");
			result.add("Class");
			result.add("ClassCastException");
			result.add("ClassCircularityError");
			result.add("ClassFormatError");
			result.add("ClassLoader");
			result.add("ClassNotFoundException");
			result.add("ClassValue");
			result.add("CloneNotSupportedException");
			result.add("Cloneable");
			result.add("Comparable");
			result.add("Compiler");
			result.add("Double");
			result.add("Deprecated");
			result.add("Enum");
			result.add("EnumConstantNotPresentException");
			result.add("Error");
			result.add("Exception");
			result.add("ExceptionInInitializerError");
			result.add("Float");
			result.add("FloatingDecimal");
			result.add("FunctionalInterface");
			result.add("IllegalAccessError");
			result.add("IllegalAccessException");
			result.add("IllegalArgumentException");
			result.add("IllegalCallerException");
			result.add("IllegalMonitorStateException");
			result.add("IllegalStateException");
			result.add("IllegalThreadStateException");
			result.add("IncompatibleClassChangeError");
			result.add("IndexOutOfBoundsException");
			result.add("InheritableThreadLocal");
			result.add("InstantiationError");
			result.add("InstantiationException");
			result.add("Integer");
			result.add("InternalError");
			result.add("InterruptedException");
			result.add("Iterable");
			result.add("LayerInstantiationException");
			result.add("LinkageError");
			result.add("Long");
			result.add("Math");
			result.add("Module");
			result.add("ModuleLayer");
			result.add("NegativeArraySizeException");
			result.add("NoClassDefFoundError");
			result.add("NoSuchFieldError");
			result.add("NoSuchFieldException");
			result.add("NoSuchMethodError");
			result.add("NoSuchMethodException");
			result.add("NullPointerException");
			result.add("Number");
			result.add("NumberFormatException");
			result.add("Object");
			result.add("Override");
			result.add("OutOfMemoryError");
			result.add("Package");
			result.add("Process");
			result.add("ProcessBuilder");
			result.add("Readable");
			result.add("ReflectiveOperationException");
			result.add("Runnable");
			result.add("Runtime");
			result.add("RuntimeException");
			result.add("RuntimePermission");
			result.add("SafeVarargs");
			result.add("SecurityException");
			result.add("SecurityManager");
			result.add("Short");
			result.add("StackOverflowError");
			result.add("StackTraceElement");
			result.add("StackWalker");
			result.add("StrictMath");
			result.add("String");
			result.add("StringBuffer");
			result.add("StringBuilder");
			result.add("StringIndexOutOfBoundsException");
			result.add("SuppressWarnings");
			result.add("System");
			result.add("Thread");
			result.add("ThreadDeath");
			result.add("ThreadGroup");
			result.add("ThreadLocal");
			result.add("Throwable");
			result.add("TypeNotPresentException");
			result.add("UnknownError");
			result.add("UnsatisfiedLinkError");
			result.add("UnsupportedClassVersionError");
			result.add("UnsupportedOperationException");
			result.add("VerifyError");
			result.add("VirtualMachineError");
			result.add("Void");
			result.add("boolean");
			result.add("byte");
			result.add("char");
			result.add("double");
			result.add("float");
			result.add("int");
			result.add("long");
			result.add("short");
			javaDefaultTypes = Collections.unmodifiableSet(result);
		}
		return javaDefaultTypes;
	}
1248507
public static ArrayList<ConfigSource> getDefaultSources(ClassLoader classloader) {
        ArrayList<ConfigSource> sources = new ArrayList<>();

        sources.add(new SystemConfigSource());
        sources.add(new EnvConfig13Source());
        sources.add(new AppPropertyConfigSource());
        sources.add(new ServerXMLVariableConfigSource());

        sources.addAll(getPropertiesFileConfigSources(classloader));

        return sources;
    }
1036409
protected final ProcessorDef[] getDefaultProviders(final ProcessorDef baseDef) {
    ProcessorDef extendsDef = getExtends();
    final Vector chain = new Vector();
    while (extendsDef != null && !chain.contains(extendsDef)) {
      chain.addElement(extendsDef);
      extendsDef = extendsDef.getExtends();
    }
    if (baseDef != null && getInherit()) {
      chain.addElement(baseDef);
    }
    final ProcessorDef[] defaultProviders = new ProcessorDef[chain.size()];
    chain.copyInto(defaultProviders);
    return defaultProviders;
  }
32145
@Override
  public String getDefaultManagerName(ClassLoader cl) {
    ConfigurationContext ctx = classLoader2config.get(cl);
    if (ctx == null) {
      ctx = createContext(cl, null, DEFAULT_CONFIGURATION_FILE);
      Map<ClassLoader, ConfigurationContext> m2 = new HashMap<ClassLoader, ConfigurationContext>(classLoader2config);
      m2.put(cl, ctx);
      classLoader2config = m2;
    }
    return ctx.getManagerConfiguration().getDefaultManagerName();
  }
859567
private String[] getCleanInstallCommandParams() {
        if (isWindows()) {
            return new String[]{Constants.CMD, C_CHAR_WINDOWS, MVN_COMMAND, MVN_CLEAN, MVN_INSTALL, MVN_SKIP_TESTS};
        } else {
            return new String[]{MVN_COMMAND, MVN_CLEAN, MVN_INSTALL, MVN_SKIP_TESTS};
        }
    }