| 1 28 29 package com.idaremedia.antx.condition; 30 31 import com.idaremedia.antx.parameters.Handling; 32 import com.idaremedia.antx.parameters.IgnoreWhitespaceEnabled; 33 import com.idaremedia.antx.parameters.IsA; 34 35 50 51 public class IsNotSet extends SimpleFlexCondition implements IgnoreWhitespaceEnabled 52 { 53 57 public IsNotSet() 58 { 59 super(); 60 } 61 62 63 67 public IsNotSet(String property) 68 { 69 setProperty(property); 70 } 71 72 73 81 public IsNotSet(String value, boolean isP) 82 { 83 if (isP) { 84 setProperty(value); 85 } else { 86 setVariable(value); 87 } 88 } 89 90 91 92 96 public void setWhitespace(Handling response) 97 { 98 getValueHelper().setWhitespace(response); 99 } 100 101 102 106 public final boolean ignoreWhitespace() 107 { 108 return getValueHelper().isIgnoreWhitespace(); 109 } 110 111 112 113 119 protected IsA getDefaultIsAForURI() 120 { 121 return IsA.PROPERTY; 122 } 123 124 125 126 130 public boolean eval() 131 { 132 verifyCanEvaluate_("eval"); 133 134 if (isReference()) { 135 Object o = getProject().getReference(getResolvedFlexValue()); 136 if (!(o instanceof String )) { return o==null; 138 } 139 } 140 141 return getValueHelper().getValue()==null; 142 } 143 } 144 145 146 | Popular Tags |