Package com.caucho.quercus.program.ClassDef

Examples of com.caucho.quercus.program.ClassDef.FieldEntry


    for (Map.Entry<String,AbstractFunction> entry : _functionMap.entrySet()) {
      cl.addMethod(entry.getKey(), entry.getValue());
    }
   
    for (Map.Entry<StringValue,FieldEntry> entry : _fieldMap.entrySet()) {
      FieldEntry fieldEntry = entry.getValue();
     
      cl.addField(entry.getKey(),
                  fieldEntry.getValue(),
                  fieldEntry.getVisibility());
    }

    String className = getName();
    for (Map.Entry<String,StaticFieldEntry> entry : _staticFieldMap.entrySet()) {
      StaticFieldEntry field = entry.getValue();
View Full Code Here


  /**
   * Adds a value.
   */
  public void addValue(Value name, Expr value, FieldVisibility visibility)
  {
    _fieldMap.put(name.toStringValue(), new FieldEntry(value, visibility));
  }
View Full Code Here

                       Expr value,
                       FieldVisibility visibility,
                       String comment)
  {
    _fieldMap.put(name.toStringValue(),
                  new FieldEntry(value, visibility, comment));
  }
View Full Code Here

  /**
   * Adds a value.
   */
  public Expr get(Value name)
  {
    FieldEntry entry = _fieldMap.get(name.toStringValue());

    if (entry != null)
      return entry.getValue();
    else
      return null;
  }
View Full Code Here

  public void initInstance(Env env, Value value)
  {
    ObjectValue object = (ObjectValue) value;
   
    for (Map.Entry<StringValue,FieldEntry> entry : _fieldMap.entrySet()) {
      FieldEntry fieldEntry = entry.getValue();

      object.initField(entry.getKey(),
           fieldEntry.getValue().eval(env).copy(),
           fieldEntry.getVisibility());
    }

    if (_destructor != null && value instanceof ObjectExtValue)
      env.addObjectCleanup((ObjectExtValue) object);
  }
View Full Code Here

   * Returns the comment for the specified field.
   */
  @Override
  public String getFieldComment(StringValue name)
  {
    FieldEntry field = _fieldMap.get(name);
   
    if (field != null)
      return field.getComment();
    else
      return null;
  }
View Full Code Here

    for (Map.Entry<String,AbstractFunction> entry : _functionMap.entrySet()) {
      cl.addMethod(entry.getKey(), entry.getValue());
    }
   
    for (Map.Entry<StringValue,FieldEntry> entry : _fieldMap.entrySet()) {
      FieldEntry fieldEntry = entry.getValue();
     
      cl.addField(entry.getKey(),
                  fieldEntry.getValue(),
                  fieldEntry.getVisibility());
    }

    String className = getName();
    for (
      Map.Entry<String, StaticFieldEntry> entry : _staticFieldMap.entrySet()
View Full Code Here

  /**
   * Adds a value.
   */
  public void addValue(Value name, Expr value, FieldVisibility visibility)
  {
    _fieldMap.put(name.toStringValue(), new FieldEntry(value, visibility));
  }
View Full Code Here

                       Expr value,
                       FieldVisibility visibility,
                       String comment)
  {
    _fieldMap.put(name.toStringValue(),
                  new FieldEntry(value, visibility, comment));
  }
View Full Code Here

  /**
   * Adds a value.
   */
  public Expr get(Value name)
  {
    FieldEntry entry = _fieldMap.get(name.toStringValue());

    if (entry != null)
      return entry.getValue();
    else
      return null;
  }
View Full Code Here

TOP

Related Classes of com.caucho.quercus.program.ClassDef.FieldEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.