com.fullspan.propkeyconst.descriptor
Class ConstantDesc

java.lang.Object
  extended bycom.fullspan.propkeyconst.descriptor.ConstantDesc
All Implemented Interfaces:
ICommentHolder

public class ConstantDesc
extends java.lang.Object
implements ICommentHolder

A constant descriptor. A constant represents a property key in a way that ensures type safety and adds convenience.

For example, instead of using a String like "form.user.loginid", a constant can be referenced as (for example) MyPropKeys.FORM.USER.LOGINID. This allows

The ConstantDesc may have a comment associated with it.

Author:
Mitch Stuart
See Also:
ICommentHolder

Nested Class Summary
static class ConstantDesc.ConstantNameComparator
           
 
Field Summary
static java.util.Comparator CONSTANT_NAME_COMPARATOR
           
 
Constructor Summary
ConstantDesc(java.lang.String propKey, java.lang.String value)
           
 
Method Summary
 CommentDesc getCommentDesc()
           
 java.lang.String getDottedClassName()
           
 boolean getHasComment()
           
 java.lang.String getName()
           
 java.lang.String getPropKey()
           
 java.lang.String getValue()
           
 void setCommentDesc(CommentDesc commentDesc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTANT_NAME_COMPARATOR

public static final java.util.Comparator CONSTANT_NAME_COMPARATOR
Constructor Detail

ConstantDesc

public ConstantDesc(java.lang.String propKey,
                    java.lang.String value)
Method Detail

getDottedClassName

public java.lang.String getDottedClassName()

getName

public java.lang.String getName()

getPropKey

public java.lang.String getPropKey()

getValue

public java.lang.String getValue()

getCommentDesc

public CommentDesc getCommentDesc()
Specified by:
getCommentDesc in interface ICommentHolder
See Also:
ICommentHolder.getCommentDesc()

getHasComment

public boolean getHasComment()
Specified by:
getHasComment in interface ICommentHolder
See Also:
ICommentHolder.getHasComment()

setCommentDesc

public void setCommentDesc(CommentDesc commentDesc)
Specified by:
setCommentDesc in interface ICommentHolder
See Also:
ICommentHolder.setCommentDesc(com.fullspan.propkeyconst.descriptor.CommentDesc)