@Test public void dollar() { SimpleNameImpl name = new SimpleNameImpl(); name.setToken("$"); }
public void setToken(String token) { Util.notNull(token, "token"); if (token.isEmpty()) { throw new IllegalArgumentException("token must not be null"); } if (Character.isJavaIdentifierStart(token.charAt(0)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid start)", LiteralAnalyzer.stringLiteralOf(token))); } for (int i = 1, n = token.length(); i < n; i++) { if (Character.isJavaIdentifierPart(token.charAt(i)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid part)", LiteralAnalyzer.stringLiteralOf(token))); } } if (RESERVED.contains(token)) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} is a reserved word)", LiteralAnalyzer.stringLiteralOf(token))); } this.token = token; }
SimpleNameImpl extends ModelRoot implements SimpleName { public void setToken(String token) { Util.notNull(token, "token"); if (token.isEmpty()) { throw new IllegalArgumentException("token must not be null"); } if (Character.isJavaIdentifierStart(token.charAt(0)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid start)", LiteralAnalyzer.stringLiteralOf(token))); } for (int i = 1, n = token.length(); i < n; i++) { if (Character.isJavaIdentifierPart(token.charAt(i)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid part)", LiteralAnalyzer.stringLiteralOf(token))); } } if (RESERVED.contains(token)) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} is a reserved word)", LiteralAnalyzer.stringLiteralOf(token))); } this.token = token; } }
SimpleNameImpl extends ModelRoot implements SimpleName { public void setToken(String token) { Util.notNull(token, "token"); if (token.isEmpty()) { throw new IllegalArgumentException("token must not be null"); } if (Character.isJavaIdentifierStart(token.charAt(0)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid start)", LiteralAnalyzer.stringLiteralOf(token))); } for (int i = 1, n = token.length(); i < n; i++) { if (Character.isJavaIdentifierPart(token.charAt(i)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid part)", LiteralAnalyzer.stringLiteralOf(token))); } } if (RESERVED.contains(token)) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} is a reserved word)", LiteralAnalyzer.stringLiteralOf(token))); } this.token = token; }  }
SimpleNameImpl extends ModelRoot implements SimpleName { public void setToken(String token) { Util.notNull(token, "token"); if (token.isEmpty()) { throw new IllegalArgumentException("token must not be null"); } if (Character.isJavaIdentifierStart(token.charAt(0)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid start)", LiteralAnalyzer.stringLiteralOf(token))); } for (int i = 1, n = token.length(); i < n; i++) { if (Character.isJavaIdentifierPart(token.charAt(i)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid part)", LiteralAnalyzer.stringLiteralOf(token))); } } if (RESERVED.contains(token)) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} is a reserved word)", LiteralAnalyzer.stringLiteralOf(token))); } this.token = token; }  @Override String getToken(); void setToken(String token); @Override SimpleName getLastSegment(); @Override List<SimpleName> toNameList(); @Override String toNameString(); @Override ModelKind getModelKind(); @Override R accept(Visitor<R, C, E> visitor, C context); }
SimpleNameImpl extends ModelRoot implements SimpleName { public void setToken(String token) { Util.notNull(token, "token"); if (token.isEmpty()) { throw new IllegalArgumentException("token must not be null"); } if (Character.isJavaIdentifierStart(token.charAt(0)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid start)", LiteralAnalyzer.stringLiteralOf(token))); } for (int i = 1, n = token.length(); i < n; i++) { if (Character.isJavaIdentifierPart(token.charAt(i)) == false) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} has invalid part)", LiteralAnalyzer.stringLiteralOf(token))); } } if (RESERVED.contains(token)) { throw new IllegalArgumentException(MessageFormat.format( "string must be a valid Java identifier ({0} is a reserved word)", LiteralAnalyzer.stringLiteralOf(token))); } this.token = token; }  @Override String getToken(); void setToken(String token); @Override SimpleName getLastSegment(); @Override List<SimpleName> toNameList(); @Override String toNameString(); @Override ModelKind getModelKind(); @Override R accept(Visitor<R, C, E> visitor, C context);  }