(LoadContext context, DatasetVariable dv)
| 91 | } |
| 92 | |
| 93 | @Override |
| 94 | public String[] unparse(LoadContext context, DatasetVariable dv) |
| 95 | { |
| 96 | PCGenScope scope = dv.getScope(); |
| 97 | if (scope != null && !scope.getName().equals(GlobalPCScope.GLOBAL_SCOPE_NAME)) |
| 98 | { |
| 99 | //is a local variable |
| 100 | return null; |
| 101 | } |
| 102 | FormatManager<?> format = dv.getFormat(); |
| 103 | if (format == null) |
| 104 | { |
| 105 | //Not a valid object |
| 106 | return null; |
| 107 | } |
| 108 | String varName = dv.getKeyName(); |
| 109 | if (!DatasetVariable.isLegalName(varName)) |
| 110 | { |
| 111 | //internal variable |
| 112 | return null; |
| 113 | } |
| 114 | StringBuilder sb = new StringBuilder(); |
| 115 | String identifier = format.getIdentifierType(); |
| 116 | if (!"NUMBER".equals(identifier)) |
| 117 | { |
| 118 | sb.append(format.getIdentifierType()); |
| 119 | sb.append('='); |
| 120 | } |
| 121 | sb.append(varName); |
| 122 | return new String[]{sb.toString()}; |
| 123 | } |
| 124 | |
| 125 | @Override |
| 126 | public Class<DatasetVariable> getTokenClass() |
nothing calls this directly
no test coverage detected