/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* The FeatureDescriptor class is the common baseclass for PropertyDescriptor,
* EventSetDescriptor, and MethodDescriptor, etc.
* <p>
* It supports some common information that can be set and retrieved for
* any of the introspection descriptors.
* <p>
* In addition it provides an extension mechanism so that arbitrary
*/
public class FeatureDescriptor {
/**
* Constructs a <code>FeatureDescriptor</code>.
*/
public FeatureDescriptor() {
}
/**
* Gets the programmatic name of this feature.
*
*/
return name;
}
/**
* Sets the programmatic name of this feature.
*
*/
}
/**
* Gets the localized display name of this feature.
*
* This defaults to the same as its programmatic name from getName.
*/
if (displayName == null) {
return getName();
}
return displayName;
}
/**
* Sets the localized display name of this feature.
*
* @param displayName The localized display name for the
*/
this.displayName = displayName;
}
/**
* The "expert" flag is used to distinguish between those features that are
* intended for expert users from those that are intended for normal users.
*
* @return True if this feature is intended for use by experts only.
*/
public boolean isExpert() {
return expert;
}
/**
* The "expert" flag is used to distinguish between features that are
* intended for expert users from those that are intended for normal users.
*
* @param expert True if this feature is intended for use by experts only.
*/
}
/**
* The "hidden" flag is used to identify features that are intended only
* for tool use, and which should not be exposed to humans.
*
* @return True if this feature should be hidden from human users.
*/
public boolean isHidden() {
return hidden;
}
/**
* The "hidden" flag is used to identify features that are intended only
* for tool use, and which should not be exposed to humans.
*
* @param hidden True if this feature should be hidden from human users.
*/
}
/**
* The "preferred" flag is used to identify features that are particularly
* important for presenting to humans.
*
* @return True if this feature should be preferentially shown to human users.
*/
public boolean isPreferred() {
return preferred;
}
/**
* The "preferred" flag is used to identify features that are particularly
* important for presenting to humans.
*
* @param preferred True if this feature should be preferentially shown
* to human users.
*/
}
/**
* Gets the short description of this feature.
*
* @return A localized short description associated with this
*/
if (shortDescription == null) {
return getDisplayName();
}
return shortDescription;
}
/**
* You can associate a short descriptive string with a feature. Normally
* these descriptive strings should be less than about 40 characters.
* @param text A (localized) short description to be associated with
*/
}
/**
* Associate a named attribute with this feature.
*
* @param attributeName The locale-independent name of the attribute
* @param value The value.
*/
}
/**
* Retrieve a named attribute with this feature.
*
* @param attributeName The locale-independent name of the attribute
* @return The value of the attribute. May be null if
* the attribute is unknown.
*/
: null;
}
/**
* Gets an enumeration of the locale-independent names of this
* feature.
*
* @return An enumeration of the locale-independent names of any
* attributes that have been registered with setValue.
*/
}
/**
* Package-private constructor,
* Merge information from two FeatureDescriptors.
* The merged hidden and expert flags are formed by or-ing the values.
* In the event of other conflicts, the second argument (y) is
* given priority over the first argument (x).
*
* @param x The first (lower priority) MethodDescriptor
* @param y The second (higher priority) MethodDescriptor
*/
if (y.shortDescription != null) {
}
displayName = x.displayName;
if (y.displayName != null) {
displayName = y.displayName;
}
}
}
/*
* Package-private dup constructor
* This must isolate the new object from any changes to the old object.
*/
}
/**
* Copies all values from the specified attribute table.
* If some attribute is exist its value should be overridden.
*
* @param table the attribute table with new values
*/
}
}
/**
* Returns the initialized attribute table.
*
* @return the initialized attribute table
*/
}
return this.table;
}
/**
* Sets the "transient" attribute according to the annotation.
* If the "transient" attribute is already set
* it should not be changed.
*
* @param annotation the annotation of the element of the feature
*/
}
}
/**
* Indicates whether the feature is transient.
*
* @return {@code true} if the feature is transient,
* {@code false} otherwise
*/
boolean isTransient() {
: false;
}
}
: null;
}
/**
* Creates a new soft reference that refers to the given object.
*
* @return a new soft reference or <code>null</code> if object is <code>null</code>
*
* @see SoftReference
*/
? new SoftReference<T>(object)
: null;
}
/**
* Creates a new weak reference that refers to the given object.
*
* @return a new weak reference or <code>null</code> if object is <code>null</code>
*
* @see WeakReference
*/
? new WeakReference<T>(object)
: null;
}
/**
* Resolves the return type of the method.
*
* @param base the class that contains the method in the hierarchy
* @param method the object that represents the method
* @return a class identifying the return type of the method
*
* @see Method#getGenericReturnType
* @see Method#getReturnType
*/
}
}
/**
* Resolves the parameter types of the method.
*
* @param base the class that contains the method in the hierarchy
* @param method the object that represents the method
* @return an array of classes identifying the parameter types of the method
*
* @see Method#getGenericParameterTypes
* @see Method#getParameterTypes
*/
}
}
private boolean expert;
private boolean hidden;
private boolean preferred;
/**
* Returns a string representation of the object.
*
* @return a string representation of the object
*
* @since 1.7
*/
}
}
}
}
}
}
}
}
if (value) {
}
}
}