com.jrockit.memleak.util
Enum ValueProperty

java.lang.Object
  extended by java.lang.Enum<ValueProperty>
      extended by com.jrockit.memleak.util.ValueProperty
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ValueProperty>

public enum ValueProperty
extends java.lang.Enum<ValueProperty>

An enum of properties in value objects that may be set if not set already.

Author:
mpersson

Enum Constant Summary
ARRAY_LENGTH
          Length of array, for IArrayInfo.
MODIFIERS
          Access modifiers, typically for IMemberInfo and IClassInfo.
NUM_DECLARED_STATIC_FIELDS
          The number of declared static fields, for a IClassInfo.
NUM_INSTANCE_FIELDS
          The number of instance fields, for a IClassInfo, including all inherited instance fields from super classes.
 
Method Summary
 java.lang.Object getDefaultValue()
           
 boolean isAcceptable(java.lang.Object existingValue, java.lang.Object newValue)
          Check if the given existingValue is the default value, and the given newValue is a different value of the right type, so that a change from the former to the latter would be acceptable.
static ValueProperty valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ValueProperty[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MODIFIERS

public static final ValueProperty MODIFIERS
Access modifiers, typically for IMemberInfo and IClassInfo.

See Also:
Modifier

ARRAY_LENGTH

public static final ValueProperty ARRAY_LENGTH
Length of array, for IArrayInfo.


NUM_DECLARED_STATIC_FIELDS

public static final ValueProperty NUM_DECLARED_STATIC_FIELDS
The number of declared static fields, for a IClassInfo.


NUM_INSTANCE_FIELDS

public static final ValueProperty NUM_INSTANCE_FIELDS
The number of instance fields, for a IClassInfo, including all inherited instance fields from super classes.

Method Detail

values

public static ValueProperty[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ValueProperty c : ValueProperty.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ValueProperty valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isAcceptable

public boolean isAcceptable(java.lang.Object existingValue,
                            java.lang.Object newValue)
Check if the given existingValue is the default value, and the given newValue is a different value of the right type, so that a change from the former to the latter would be acceptable.

Parameters:
existingValue -
newValue -
Returns:
true iff the property value may change from existingValue to newValue.

getDefaultValue

public java.lang.Object getDefaultValue()
Returns:
the default value


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.