Here you can find the source of newDocumentBuilderFactory()
public static DocumentBuilderFactory newDocumentBuilderFactory()
//package com.java2s; /******************************************************************************* * Copyright (c) 2008 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors://from www. j av a2 s . co m * Actuate Corporation - initial API and implementation *******************************************************************************/ import java.security.AccessController; import java.security.PrivilegedAction; import javax.xml.parsers.DocumentBuilderFactory; public class Main { /** * Instantiate a new DocumentBuilderFactory. * * @return */ public static DocumentBuilderFactory newDocumentBuilderFactory() { DocumentBuilderFactory piTmp0 = null; piTmp0 = AccessController.doPrivileged(new PrivilegedAction<DocumentBuilderFactory>() { public DocumentBuilderFactory run() { return DocumentBuilderFactory.newInstance(); } }); return piTmp0; } }