<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; public class PrimitiveType extends Type { public static class Code { private String name ; Code ( String name ) { this . name = name ; } public String toString ( ) { return this . name ; } } public static final Code INT = new Code ( "int" ) ; public static final Code CHAR = new Code ( "char" ) ; public static final Code BOOLEAN = new Code ( "boolean" ) ; public static final Code SHORT = new Code ( "short" ) ; public static final Code LONG = new Code ( "long" ) ; public static final Code FLOAT = new Code ( "float" ) ; public static final Code DOUBLE = new Code ( "double" ) ; public static final Code BYTE = new Code ( "byte" ) ; public static final Code VOID = new Code ( "void" ) ; private PrimitiveType . Code typeCode = INT ; private static final Map CODES ; static { CODES = new HashMap ( 20 ) ; Code [ ] ops = { INT , BYTE , CHAR , BOOLEAN , SHORT , LONG , FLOAT , DOUBLE , VOID , } ; for ( int i = 0 ; i < ops . length ; i ++ ) { CODES . put ( ops [ i ] . toString ( ) , ops [ i ] ) ; } } public static PrimitiveType . Code toCode ( String token ) { return ( PrimitiveType . Code ) CODES . get ( token ) ; } public static final SimplePropertyDescriptor PRIMITIVE_TYPE_CODE_PROPERTY = new SimplePropertyDescriptor ( PrimitiveType . class , "" , PrimitiveType . Code . class , MANDATORY ) ; private static final List PROPERTY_DESCRIPTORS ; static { List propertyList = new ArrayList ( 2 ) ; createPropertyList ( PrimitiveType . class , propertyList ) ; addProperty ( PRIMITIVE_TYPE_CODE_PROPERTY , propertyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( propertyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } PrimitiveType ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { if ( property == PRIMITIVE_TYPE_CODE_PROPERTY ) { if ( get ) { return getPrimitiveTypeCode ( ) ; } else { setPrimitiveTypeCode ( ( Code ) value ) ; return null ; } } return super . internalGetSetObjectProperty ( property , get , value ) ; } final int getNodeType0 ( ) { return PRIMITIVE_TYPE ; } ASTNode clone0 ( AST target ) { PrimitiveType result = new PrimitiveType ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setPrimitiveTypeCode ( getPrimitiveTypeCode ( ) ) ; 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 PrimitiveType . Code getPrimitiveTypeCode ( ) { return this . typeCode ; } public void setPrimitiveTypeCode ( PrimitiveType . Code typeCode ) { if ( typeCode == null ) { throw new IllegalArgumentException ( ) ; } preValueChange ( PRIMITIVE_TYPE_CODE_PROPERTY ) ; this . typeCode = typeCode ; postValueChange ( PRIMITIVE_TYPE_CODE_PROPERTY ) ; } int memSize ( ) { return BASE_NODE_SIZE + 1 * 4 ; } int treeSize ( ) { return memSize ( ) ; } } </s>