예제 #1
0
 /** @return Returns the <code>String</code> value of the attribute */
 @Override
 public String getValue() {
   try {
     return Value.enumValueOf(super.getValue()).toString();
   } catch (IllegalArgumentException e) {
     // TODO: validation handling/logging
     throw new NumberFormatException("the value of draw:kind is not valid");
   }
 }
예제 #2
0
 /**
  * @param attrValue The <code>String</code> value of the attribute.
  * @throws IllegalArgumentException If the provided attribute value is invalid
  */
 @Override
 public void setValue(String attrValue) {
   try {
     super.setValue(Value.enumValueOf(attrValue).toString());
   } catch (NullPointerException e) {
     // TODO: validation handling/logging
     throw new IllegalArgumentException(e);
   } catch (IllegalArgumentException e) {
     // TODO: validation handling/logging
     throw (e);
   }
 }
 /** @return Returns the <code>Enum</code> value of the attribute */
 public Value getEnumValue() {
   return Value.enumValueOf(this.getValue());
 }