<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; import org . eclipse . jdt . internal . compiler . util . Util ; public final class TextElement extends ASTNode implements IDocElement { public static final SimplePropertyDescriptor TEXT_PROPERTY = new SimplePropertyDescriptor ( TextElement . class , "text" , String . class , MANDATORY ) ; private static final List PROPERTY_DESCRIPTORS ; static { List propertyList = new ArrayList ( 2 ) ; createPropertyList ( TextElement . class , propertyList ) ; addProperty ( TEXT_PROPERTY , propertyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( propertyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private String text = Util . EMPTY_STRING ; TextElement ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { if ( property == TEXT_PROPERTY ) { if ( get ) { return getText ( ) ; } else { setText ( ( String ) value ) ; return null ; } } return super . internalGetSetObjectProperty ( property , get , value ) ; } final int getNodeType0 ( ) { return TEXT_ELEMENT ; } ASTNode clone0 ( AST target ) { TextElement result = new TextElement ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setText ( getText ( ) ) ; 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 getText ( ) { return this . text ; } public void setText ( String text ) { if ( text == null ) { throw new IllegalArgumentException ( ) ; } if ( text . indexOf ( "*/" ) > 0 ) { throw new IllegalArgumentException ( ) ; } preValueChange ( TEXT_PROPERTY ) ; this . text = text ; postValueChange ( TEXT_PROPERTY ) ; } int memSize ( ) { int size = BASE_NODE_SIZE + 1 * 4 ; if ( this . text != Util . EMPTY_STRING ) { size += stringSize ( this . text ) ; } return size ; } int treeSize ( ) { return memSize ( ) ; } } </s>