本文整理汇总了Java中org.jfree.util.Log.debug方法的典型用法代码示例。如果您正苦于以下问题:Java Log.debug方法的具体用法?Java Log.debug怎么用?Java Log.debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.util.Log
的用法示例。
在下文中一共展示了Log.debug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Loads all modules mentioned in the report configuration starting with
* the given prefix. This method is used during the boot process of
* JFreeReport. You should never need to call this method directly.
*
* @param modulePrefix the module prefix.
*/
public void load(final String modulePrefix) {
if (this.initSections.contains(modulePrefix)) {
return;
}
this.initSections.add(modulePrefix);
final Configuration config = this.booter.getGlobalConfig();
final Iterator it = config.findPropertyKeys(modulePrefix);
int count = 0;
while (it.hasNext()) {
final String key = (String) it.next();
if (key.endsWith(".Module")) {
final String moduleClass = config.getConfigProperty(key);
if (moduleClass != null && moduleClass.length() > 0) {
addModule(moduleClass);
count++;
}
}
}
Log.debug("Loaded a total of " + count + " modules under prefix: " + modulePrefix);
}
示例2: getParser
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Returns a SAX parser.
*
* @return a SAXParser.
*
* @throws ParserConfigurationException if there is a problem configuring the parser.
* @throws SAXException if there is a problem with the parser initialisation
*/
protected SAXParser getParser() throws ParserConfigurationException, SAXException {
if (this.factory == null) {
this.factory = SAXParserFactory.newInstance();
if (isValidateDTD()) {
try {
// dont touch the validating feature, if not needed ..
this.factory.setValidating(true);
}
catch (Exception ex) {
// the parser does not like the idea of validating ...
Log.debug("The parser will not validate the xml document.", ex);
}
}
}
return this.factory.newSAXParser();
}
示例3: getTfsIssue
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Gets the issue from TFS after parsing the ID.
* @param issueId The issue ID as a string
* @param host The TFS collection URL
* @param credentials The credentials needed to connect to TFS.
* @return The issue data if located.
* @throws Exception Thrown if the issue could not be located.
*/
@NotNull
private IssueData getTfsIssue(@NotNull String issueId, @NotNull String host, @Nullable Credentials credentials)
throws Exception {
Log.debug(String.format("Getting issue from issue fetcher: %s", issueId));
try {
int issueNumber = parseIssueId(issueId);
IssueData issueData = this.tfsDataProvider.getIssueById(issueNumber, host, credentials);
if (issueData == null) {
throw new Exception("Could not find issue in TFS Id: " + issueId);
}
return issueData;
}
catch (Exception ex) {
LOG.error("Cannot get issue: " + issueId);
LOG.error(ex);
throw ex;
}
}
示例4: load
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Loads the properties stored in the given file. This method does nothing if
* the file does not exist or is unreadable. Appends the contents of the loaded
* properties to the already stored contents.
*
* @param resourceName the file name of the stored properties.
* @param resourceSource ?
*/
public void load(final String resourceName, final Class resourceSource)
{
final InputStream in = ObjectUtilities.getResourceRelativeAsStream
(resourceName, resourceSource);
if (in != null)
{
try
{
load(in);
}
finally
{
try
{
in.close();
}
catch (IOException e)
{
// ignore
}
}
}
else
{
Log.debug ("Configuration file not found in the classpath: " + resourceName);
}
}
示例5: prune
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Removes any class descriptions that are not fully defined.
*/
public void prune() {
final ClassDescription[] cds = (ClassDescription[]) this.classes.toArray(new ClassDescription[0]);
for (int i = 0; i < cds.length; i++) {
if (cds[i].isUndefined()) {
removeClassDescription(cds[i]);
Log.debug("Pruned: " + cds[i].getName());
}
}
}
示例6: addIgnoredBaseClass
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Adds a base class that should be ignored.
*
* @param baseClass the base class name.
*/
public void addIgnoredBaseClass(final String baseClass) {
final Class loadedClass = loadClass(baseClass);
if (loadedClass != null) {
Log.debug (new Log.SimpleMessage("Added IgnClass: " , baseClass));
this.ignoredBaseClasses.add(loadedClass);
}
}
示例7: collectFiles
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Collects the files/classes.
*
* @param directory the starting directory.
* @param packageName the initial package name.
*/
protected void collectFiles(final File directory, final String packageName) {
final File[] files = directory.listFiles(this.eff);
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
collectFiles(files[i], buildJavaName(packageName, files[i].getName()));
}
else {
final String fname = files[i].getName();
final String className = fname.substring(0, fname.length() - 5);
final String fullName = buildJavaName(packageName, className);
if (isIgnoredPackage(fullName)) {
Log.debug (new Log.SimpleMessage("Do not process: Ignored: ", className));
continue;
}
final Class jclass = loadClass(fullName);
if (jclass == null || isIgnoredBaseClass(jclass)) {
continue;
}
if (jclass.isInterface() || Modifier.isAbstract(jclass.getModifiers())) {
Log.debug (new Log.SimpleMessage("Do not process: Abstract: ", className));
continue;
}
if (!Modifier.isPublic(jclass.getModifiers())) {
Log.debug (new Log.SimpleMessage("Do not process: Not public: ", className));
continue;
}
this.fileList.add(jclass);
}
}
}
示例8: main
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Runs the generator, using the 'generator.properties' file for configuration info.
*
* @param args command line arguments.
*
* @throws Exception if something goes wrong!
*/
public static void main(final String[] args) throws Exception {
Log.getInstance().addTarget(new PrintStreamLogTarget());
URL propertyURL = ObjectUtilities.getResourceRelative
("generator.properties", DescriptionGenerator.class);
if (args.length > 0) {
final File f = new File(args[0]);
propertyURL = f.toURL();
}
final Properties p = loadProperties(propertyURL);
final String handlerSource = p.getProperty("attributedefinition");
if (handlerSource != null) {
final Properties handlers = loadProperties(new URL(propertyURL, handlerSource));
ModelBuilder.getInstance().addAttributeHandlers(handlers);
}
final String source = p.getProperty("sourcedirectory", ".");
final String target = p.getProperty("targetfile", "model.xml");
DescriptionModel model = null;
try {
model = new DefaultModelReader().load(target);
}
catch (Exception e) {
Log.debug("Unable to load default model. Ignoring...");
}
// Log.debug (model.getModelComments());
model = generate(source, p, model);
model.prune();
writeMultiFile(target, model);
System.exit(0);
}
示例9: writeSingleFile
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Writes the class description model to a single file.
*
* @param target the target file name.
* @param model the class description model.
*
* @throws IOException if there is an I/O problem.
*/
public static void writeSingleFile(final String target, final DescriptionModel model) throws IOException {
Log.debug ("Writing ...");
final ModelWriter writer = new ModelWriter();
writer.setModel(model);
final Writer w = new BufferedWriter(new FileWriter(target));
writer.write(w);
w.close();
}
示例10: configureReader
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Configures the xml reader. Use this to set features or properties
* before the documents get parsed.
*
* @param handler the parser implementation that will handle the SAX-Callbacks.
* @param reader the xml reader that should be configured.
*/
protected void configureReader(final XMLReader reader, final FrontendDefaultHandler handler) {
try {
reader.setProperty
("http://xml.org/sax/properties/lexical-handler", handler.getCommentHandler());
}
catch (SAXException se) {
Log.debug("Comments are not supported by this SAX implementation.");
}
}
示例11: parseXmlDocument
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Parses the given specification and loads all includes specified in the files.
* This implementation does not check for loops in the include files.
*
* @param resource the url of the xml specification.
* @param isInclude an include?
*
* @throws org.jfree.xml.util.ObjectDescriptionException if an error occured which prevented the
* loading of the specifications.
*/
protected void parseXmlDocument(final URL resource, final boolean isInclude)
throws ObjectDescriptionException {
try {
final InputStream in = new BufferedInputStream(resource.openStream());
final SAXParserFactory factory = SAXParserFactory.newInstance();
final SAXParser saxParser = factory.newSAXParser();
final XMLReader reader = saxParser.getXMLReader();
final SAXModelHandler handler = new SAXModelHandler(resource, isInclude);
try {
reader.setProperty
("http://xml.org/sax/properties/lexical-handler",
getCommentHandler());
}
catch (SAXException se) {
Log.debug("Comments are not supported by this SAX implementation.");
}
reader.setContentHandler(handler);
reader.setDTDHandler(handler);
reader.setErrorHandler(handler);
reader.parse(new InputSource(in));
in.close();
}
catch (Exception e) {
// unable to init
Log.warn("Unable to load factory specifications", e);
throw new ObjectDescriptionException("Unable to load object factory specs.", e);
}
}
示例12: toAttributeValue
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Converts the attribute to a string.
*
* @param o the attribute ({@link Integer} expected).
*
* @return A string representing the integer value.
*/
public String toAttributeValue(final Object o) {
try {
final Integer in = (Integer) o;
return in.toString();
}
catch (ClassCastException cce) {
if (o != null) {
Log.debug("ClassCastException: Expected Integer, found " + o.getClass());
}
throw cce;
}
}
示例13: propertyChange
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* This method gets called when a bound property is changed.
*
* @param evt A PropertyChangeEvent object describing the event source
* and the property that has changed.
*/
public void propertyChange(final PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("enabled") == false) {
Log.debug ("PropertyName");
return;
}
if (evt.getSource() instanceof RootEditor == false) {
Log.debug ("Source");
return;
}
final RootEditor editor = (RootEditor) evt.getSource();
updateRootEditorEnabled(editor);
}
示例14: solveWithGirvanNewman
import org.jfree.util.Log; //导入方法依赖的package包/类
SolverResult solveWithGirvanNewman(final int numberOfClusters) {
Log.debug("solve cluster with numberOfClusters = " + numberOfClusters);
GirvanNewmanClusterer clusterer = new GirvanNewmanClusterer();
clusterer.setPreferredNumberOfClusters(numberOfClusters);
clusterer.execute(graphModel);
SolverResult solverResult = new SolverResult(getClustererResult(clusterer));
return solverResult;
}
示例15: getIssues
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Gets the data related to a specific work item.
* @param ids The ID collection of the issue to get.
* @param host The TFS host URL
* @param credentials The credentials needed to access TFS.
* @throws com.microsoft.tfs.core.httpclient.auth.InvalidCredentialsException Thrown if we cannot connect to the server.
* @return The work item data of the items that could be located.
*/
@NotNull
public Collection<IssueData> getIssues(@NotNull Collection<Integer> ids, @NotNull String host, @Nullable Credentials credentials)
throws InvalidCredentialsException {
TFSTeamProjectCollection collection = null;
WorkItemClient client = null;
try {
collection = getProjectCollection(host, credentials);
client = collection.getWorkItemClient();
Collection<IssueData> issues = new ArrayList<IssueData>();
for (Integer id: ids) {
Log.debug(String.format("Getting work item %d from TFS in batch", id));
issues.add(getIssueById(id, collection, client));
}
return issues;
}
finally {
if (client != null) {
client.close();
}
if (collection != null) {
collection.close();
}
}
}