|
Java example source code file (ProviderFactory.java)
The ProviderFactory.java Java example source code
package com.sun.tracing;
import java.util.HashSet;
import java.io.PrintStream;
import java.lang.reflect.Field;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import sun.security.action.GetPropertyAction;
import sun.tracing.NullProviderFactory;
import sun.tracing.PrintStreamProviderFactory;
import sun.tracing.MultiplexProviderFactory;
import sun.tracing.dtrace.DTraceProviderFactory;
/**
* {@code ProviderFactory} is a factory class used to create instances of
* providers.
*
* To enable tracing in an application, this class must be used to create
* instances of the provider interfaces defined by users.
* The system-defined factory is obtained by using the
* {@code getDefaultFactory()} static method. The resulting instance can be
* used to create any number of providers.
*
* @since 1.7
*/
public abstract class ProviderFactory {
protected ProviderFactory() {}
/**
* Creates an implementation of a Provider interface.
*
* @param cls the provider interface to be defined.
* @return an implementation of {@code cls}, whose methods, when called,
* will trigger tracepoints in the application.
* @throws NullPointerException if cls is null
* @throws IllegalArgumentException if the class definition contains
* non-void methods
*/
public abstract <T extends Provider> T createProvider(Class
Other Java examples (source code examples)Here is a short list of links related to this Java ProviderFactory.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.