From 5e5bc93b78c346beea0609fa98770844e75c43e5 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 24 Feb 2009 18:18:28 +0000 Subject: [PATCH] doc improvement git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15655 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/model/Hudson.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/hudson/model/Hudson.java b/core/src/main/java/hudson/model/Hudson.java index c1b81dd828..b5d3b0dcdb 100644 --- a/core/src/main/java/hudson/model/Hudson.java +++ b/core/src/main/java/hudson/model/Hudson.java @@ -700,6 +700,12 @@ public final class Hudson extends Node implements ItemGroup, Stapl return null; } + /** + * Gets the {@link Descriptor} that corresponds to the given {@link Describable} type. + *

+ * If you have an instance of {@code type} and call {@link Describable#getDescriptor()}, + * you'll get the same instance that this method returns. + */ public Descriptor getDescriptor(Class type) { for( Descriptor d : getExtensionList(Descriptor.class) ) if(d.clazz==type)