Exemplo n.º 1
0
  private AFieldDeclCG consInstanceField(String name) {
    AClassTypeCG quoteClassType = new AClassTypeCG();
    quoteClassType.setName(name);

    AFieldDeclCG field = new AFieldDeclCG();
    field.setAccess(IJavaConstants.PRIVATE);
    field.setVolatile(false);
    field.setFinal(false);
    field.setStatic(true);
    field.setName(INSTANCE_FIELD);
    field.setType(quoteClassType);
    field.setInitial(info.getExpAssistant().consNullExp());

    return field;
  }
Exemplo n.º 2
0
  private AFieldDeclCG consHashcodeField() {
    AExternalTypeCG fieldType = new AExternalTypeCG();
    fieldType.setName(IJavaConstants.INT);

    AFieldDeclCG field = new AFieldDeclCG();
    field.setAccess(IJavaConstants.PRIVATE);
    field.setVolatile(false);
    field.setFinal(false);
    field.setStatic(true);
    field.setName(HASHCODE_FIELD);
    field.setType(fieldType);
    field.setInitial(consZero());

    return field;
  }