com.fullspan.propkeyconst.descriptor
Class CommentDesc

java.lang.Object
  extended bycom.fullspan.propkeyconst.descriptor.CommentDesc

public class CommentDesc
extends java.lang.Object

A comment descriptor. A comment can be on a Class (root or inner), or on a Constant.

Author:
Mitch Stuart

Field Summary
static java.lang.String CLASS_COMMENT_SUFFIX
           
static int CLASS_COMMENT_SUFFIX_LEN
           
static java.lang.String PROP_COMMENT_SUFFIX
           
static int PROP_COMMENT_SUFFIX_LEN
           
 
Constructor Summary
CommentDesc(java.lang.String propKey, java.lang.String propValue)
           
 
Method Summary
 java.lang.String getComment()
           
 java.lang.String getDottedClassName()
           
 boolean getIsClassComment()
           
 boolean getIsConstantComment()
           
 java.lang.String getPropKey()
           
 java.lang.String getPropName()
           
static boolean isComment(java.lang.String propKey)
          Determines if a propKey is a comment based on the naming convention.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_COMMENT_SUFFIX

public static final java.lang.String CLASS_COMMENT_SUFFIX
See Also:
Constant Field Values

CLASS_COMMENT_SUFFIX_LEN

public static final int CLASS_COMMENT_SUFFIX_LEN

PROP_COMMENT_SUFFIX

public static final java.lang.String PROP_COMMENT_SUFFIX
See Also:
Constant Field Values

PROP_COMMENT_SUFFIX_LEN

public static final int PROP_COMMENT_SUFFIX_LEN
Constructor Detail

CommentDesc

public CommentDesc(java.lang.String propKey,
                   java.lang.String propValue)
Parameters:
propKey -
propValue -
Throws:
java.lang.IllegalArgumentException - if propKey does not end with CLASS_COMMENT_SUFFIX or PROP_COMMENT_SUFFIX
Method Detail

isComment

public static boolean isComment(java.lang.String propKey)
Determines if a propKey is a comment based on the naming convention. Class comment property keys end with $CLASS_COMMENT_SUFFIX and Property (Constant) comment property keys end with $PROP_COMMENT_SUFFIX.

Returns:
true if the propKey is a comment, otherwise false.

getComment

public java.lang.String getComment()

getDottedClassName

public java.lang.String getDottedClassName()

getPropKey

public java.lang.String getPropKey()

getPropName

public java.lang.String getPropName()

getIsConstantComment

public boolean getIsConstantComment()

getIsClassComment

public boolean getIsClassComment()