<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; import org . eclipse . jdt . core . compiler . InvalidInputException ; import org . eclipse . jdt . internal . compiler . parser . Scanner ; import org . eclipse . jdt . internal . compiler . parser . TerminalTokens ; public class NumberLiteral extends Expression { public static final SimplePropertyDescriptor TOKEN_PROPERTY = new SimplePropertyDescriptor ( NumberLiteral . class , "token" , String . class , MANDATORY ) ; private static final List PROPERTY_DESCRIPTORS ; static { List propertyList = new ArrayList ( 2 ) ; createPropertyList ( NumberLiteral . class , propertyList ) ; addProperty ( TOKEN_PROPERTY , propertyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( propertyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private String tokenValue = "0" ; NumberLiteral ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { if ( property == TOKEN_PROPERTY ) { if ( get ) { return getToken ( ) ; } else { setToken ( ( String ) value ) ; return null ; } } return super . internalGetSetObjectProperty ( property , get , value ) ; } final int getNodeType0 ( ) { return NUMBER_LITERAL ; } ASTNode clone0 ( AST target ) { NumberLiteral result = new NumberLiteral ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setToken ( getToken ( ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { return matcher . match ( this , other ) ; } void accept0 ( ASTVisitor visitor ) { visitor . visit ( this ) ; visitor . endVisit ( this ) ; } public String getToken ( ) { return this . tokenValue ; } public void setToken ( String token ) { if ( token == null || token . length ( ) == 0 ) { throw new IllegalArgumentException ( ) ; } Scanner scanner = this . ast . scanner ; char [ ] source = token . toCharArray ( ) ; scanner . setSource ( source ) ; scanner . resetTo ( 0 , source . length ) ; scanner . tokenizeComments = false ; scanner . tokenizeWhiteSpace = false ; try { int tokenType = scanner . getNextToken ( ) ; switch ( tokenType ) { case TerminalTokens . TokenNameDoubleLiteral : case TerminalTokens . TokenNameIntegerLiteral : case TerminalTokens . TokenNameFloatingPointLiteral : case TerminalTokens . TokenNameLongLiteral : break ; case TerminalTokens . TokenNameMINUS : tokenType = scanner . getNextToken ( ) ; switch ( tokenType ) { case TerminalTokens . TokenNameDoubleLiteral : case TerminalTokens . TokenNameIntegerLiteral : case TerminalTokens . TokenNameFloatingPointLiteral : case TerminalTokens . TokenNameLongLiteral : break ; default : throw new IllegalArgumentException ( "" + token + "<" ) ; } break ; default : throw new IllegalArgumentException ( "" + token + "<" ) ; } } catch ( InvalidInputException e ) { throw new IllegalArgumentException ( ) ; } finally { scanner . tokenizeComments = true ; scanner . tokenizeWhiteSpace = true ; } preValueChange ( TOKEN_PROPERTY ) ; this . tokenValue = token ; postValueChange ( TOKEN_PROPERTY ) ; } void internalSetToken ( String token ) { preValueChange ( TOKEN_PROPERTY ) ; this . tokenValue = token ; postValueChange ( TOKEN_PROPERTY ) ; } int memSize ( ) { int size = BASE_NODE_SIZE + 1 * 4 + stringSize ( this . tokenValue ) ; return size ; } int treeSize ( ) { return memSize ( ) ; } } </s>