PloField.java :  » Game » kaddath » fr » umlv » plo » ploObject » Android Open Source

Android Open Source » Game » kaddath 
kaddath » fr » umlv » plo » ploObject » PloField.java
/*
 * Created on 22 dc. 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package fr.umlv.plo.ploObject;

import fr.umlv.plo.interfaces.IExpr;
import fr.umlv.plo.interfaces.IField;
import fr.umlv.plo.interfaces.IType;
import fr.umlv.plo.visitor.Visitor;

/**
 * @author jmoisson
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class PloField implements IField {

  private String name;
  private IType type;
  
  /* (non-Javadoc)
   * @see fr.umlv.plo.interfaces.IField#getName()
   */
  public String getName() {
    
    return name;
  }
  
  public void setName(String name) {
    
    this.name = name;
  }

  public String toString() {
    
    StringBuilder sb = new StringBuilder();
    sb.append("\n<field name=\""+name+"\" type=\""+type.getName()+"\" />");
        
    return sb.toString();
  }
  
  /* (non-Javadoc)
   * @see fr.umlv.plo.interfaces.IField#getType()
   */
  public IType getType() {
    // TODO Auto-generated method stub
    return type;
  }

  /* (non-Javadoc)
   * @see fr.umlv.plo.interfaces.IField#getValue()
   */
  public IExpr getValue() {
    // TODO Auto-generated method stub
    return null;
  }

  /* (non-Javadoc)
   * @see fr.umlv.plo.interfaces.Visitable#accept(fr.umlv.plo.visitor.Visitor)
   */
  public void accept(Visitor v) {
    // TODO Auto-generated method stub
    
  }

  public void setType(IType type) {
      
    this.type = type;    
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.