Adds the toOpenEngSBModelValues method to the class.
502185
private static void addToOpenEngSBModelValues(CtClass clazz) throws NotFoundException,
        CannotCompileException, ClassNotFoundException {
        StringBuilder builder = new StringBuilder();
        CtClass[] params = generateClassField();
        CtMethod m = new CtMethod(cp.get(List.class.getName()), "toOpenEngSBModelValues", params, clazz);
        builder.append(createTrace("Add elements of the model tail"))
            .append("List elements = new ArrayList();\n")
            .append(createTrace("Add properties of the model"))
            .append(createModelEntryList(clazz))
            .append("return elements;");
        m.setBody(createMethodBody(builder.toString()));
        clazz.addMethod(m);
    }
590137
def add(self, name, value):
        ''''''
        normalized_name = normalize_name(name, self._normalize_overrides)
        self._map[normalized_name].append(value)
1325580
public void addStubMethods(TypeSpec.Builder classBuilder) {

        MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("onTransact")
                .addModifiers(Modifier.PUBLIC)
                .addAnnotation(Override.class)
                .returns(boolean.class)
                .addException(ClassName.get("android.os", "RemoteException"))
                .addParameter(int.class, "code")
                .addParameter(ClassName.get("android.os", "Parcel"), "data")
                .addParameter(ClassName.get("android.os", "Parcel"), "reply")
                .addParameter(int.class, "flags");

        methodBuilder.beginControlFlow("try");
        methodBuilder.beginControlFlow("switch (code)");

        methodBuilder.beginControlFlow("case INTERFACE_TRANSACTION:");
        methodBuilder.addStatement("reply.writeString(DESCRIPTOR)");
        methodBuilder.addStatement("return true");
        methodBuilder.endControlFlow();

        processRemoterElements(classBuilder, new ElementVisitor() {
            @Override
            public void visitElement(TypeSpec.Builder classBuilder, Element member, int methodIndex, MethodSpec.Builder methodBuilder) {
                addStubMethods(classBuilder, member, methodIndex, methodBuilder);
            }
        }, methodBuilder);


        methodBuilder.beginControlFlow("case TRANSACTION__getStubID:");
        methodBuilder.addStatement("data.enforceInterface(DESCRIPTOR)");
        methodBuilder.addStatement("reply.writeNoException()");
        methodBuilder.addStatement("reply.writeInt(serviceImpl.hashCode())");
        methodBuilder.addStatement("return true");
        methodBuilder.endControlFlow();


        //end switch
        methodBuilder.endControlFlow();
        //end of try
        methodBuilder.endControlFlow();
        //catch rethrow
        methodBuilder.beginControlFlow("catch ($T re)", Throwable.class);
        methodBuilder.beginControlFlow("if ((flags & FLAG_ONEWAY) == 0)");
        methodBuilder.addStatement("reply.setDataPosition(0)");
        methodBuilder.addStatement("reply.writeInt(REMOTER_EXCEPTION_CODE)");
        methodBuilder.addStatement("reply.writeString(re.getMessage())");
        methodBuilder.addStatement("reply.writeSerializable(re)");
        methodBuilder.endControlFlow();
        methodBuilder.beginControlFlow("else");
        methodBuilder.addStatement("$T.w(serviceImpl.getClass().getName(), \"Binder call failed.\", re)", ClassName.get("android.util", "Log"));
        methodBuilder.endControlFlow();
        methodBuilder.addStatement("return true");
        methodBuilder.endControlFlow();
        methodBuilder.addStatement("return super.onTransact(code, data, reply, flags)");
        classBuilder.addMethod(methodBuilder.build());
        addCommonExtras(classBuilder);

        addStubExtras(classBuilder);

    }
640085
def setModel(self, model):
        ""
        self._model = model
        self.ui.aofsSpnbx.setValue(model.samplerate())
1195741
@Override
	public void add(E value) {		 
		TypeName typeName=value.getPropertyType().getTypeName();
		TypeName resolvedTypeName=typeVariableResolver.resolve(typeName);
		
		value.getPropertyType().setTypeName(resolvedTypeName);
		
		super.add(value);
	}
857485
public void addNewAttributeValue(String value) {

        // make sure not to add more values than allowed
        int maxOccurrence = getEntityType().getAttributeMaxOccurrence(m_attributeName);
        CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
        boolean mayHaveMore = ((attribute == null) || (attribute.getValueCount() < maxOccurrence));
        if (mayHaveMore && getAttributeType().isSimpleType()) {
            I_CmsFormEditWidget widget = m_widgetService.getAttributeFormWidget(m_attributeName);
            m_entity.addAttributeValue(m_attributeName, value);
            int valueCount = m_entity.getAttribute(m_attributeName).getValueCount();
            String defaultValue = m_widgetService.getDefaultAttributeValue(
                m_attributeName,
                getSimplePath(valueCount - 1));
            CmsAttributeValueView valueView = null;
            if ((m_attributeValueViews.size() == 1) && !m_attributeValueViews.get(0).hasValue()) {
                valueView = m_attributeValueViews.get(0);
                valueView.setActive();
                // setActive may have reset the value, so we set it again
                m_entity.setAttributeValue(m_attributeName, value, valueCount - 1);
                valueView.getValueWidget().setValue(value);
            } else {
                valueView = new CmsAttributeValueView(
                    this,
                    m_widgetService.getAttributeLabel(m_attributeName),
                    m_widgetService.getAttributeHelp(m_attributeName));
                if (m_widgetService.isDisplaySingleLine(m_attributeName)) {
                    valueView.setCompactMode(CmsAttributeValueView.COMPACT_MODE_SINGLE_LINE);
                }
                ((FlowPanel)m_attributeValueViews.get(0).getParent()).add(valueView);
                valueView.setValueWidget(widget, value, defaultValue, true);
            }
            CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
            if (handler.isIntitalized()) {
                handler.addChange(
                    m_entity.getId(),
                    m_attributeName,
                    m_entity.getAttribute(m_attributeName).getValueCount() - 1,
                    ChangeType.add);
            }
            updateButtonVisisbility();
        }
    }
310035
public <T extends Model>  void addModels(List<T> models){
        for (T model : models) {
            add(model);
        }
    }
711264
protected function addLastModel()
    {
        if (!$this->lastModelPopulator) {
            return;
        }

        $this->addOwners($this->lastModelPopulator->getOwners());

        $this->modelPopulators[$this->lastModelClass] = $this->lastModelPopulator;
        $this->quantities[$this->lastModelClass] = $this->lastQuantity;
    }
510
void addMethodInfo(final MethodInfoList methodInfoList, final Map<String, ClassInfo> classNameToClassInfo) {
        for (final MethodInfo mi : methodInfoList) {
            // Index method annotations
            addFieldOrMethodAnnotationInfo(mi.annotationInfo, /* isField = */ false, classNameToClassInfo);

            // Index method parameter annotations
            if (mi.parameterAnnotationInfo != null) {
                for (int i = 0; i < mi.parameterAnnotationInfo.length; i++) {
                    final AnnotationInfo[] paramAnnotationInfoArr = mi.parameterAnnotationInfo[i];
                    if (paramAnnotationInfoArr != null) {
                        for (int j = 0; j < paramAnnotationInfoArr.length; j++) {
                            final AnnotationInfo methodParamAnnotationInfo = paramAnnotationInfoArr[j];
                            final ClassInfo annotationClassInfo = getOrCreateClassInfo(
                                    methodParamAnnotationInfo.getName(), ANNOTATION_CLASS_MODIFIER,
                                    classNameToClassInfo);
                            annotationClassInfo.addRelatedClass(RelType.CLASSES_WITH_METHOD_PARAMETER_ANNOTATION,
                                    this);
                            this.addRelatedClass(RelType.METHOD_PARAMETER_ANNOTATIONS, annotationClassInfo);
                        }
                    }
                }
            }
        }
        if (this.methodInfo == null) {
            this.methodInfo = methodInfoList;
        } else {
            this.methodInfo.addAll(methodInfoList);
        }
    }
1080519
public static void setValueOfModel(Object model, OpenEngSBModelEntry entry, Object value) throws 
            NoSuchFieldException, 
            IllegalArgumentException, 
            IllegalAccessException {
        Class clazz = model.getClass();
        Field field = clazz.getDeclaredField(entry.getKey());
        field.setAccessible(true);
        field.set(model, value);    
    }
444084
private static void addDialectsFromVMParameters() {
    	Properties properties = System.getProperties();
    	for (Object key : properties.keySet()) {
    		if (key instanceof String) {
    			String name = (String) key;
    			if (name.startsWith(DATABASE)) {    				
    				String databaseName = properties.getProperty(name);    				
    				int index = name.indexOf("_");
    				if (index > 0) {
    					String suffix = name.substring(index);
    					String dialectClass = properties.getProperty(DIALECT + suffix);    					
    					if (dialectClass != null) {
    						addDialect(databaseName, dialectClass);
    					}
    				}    				
    			}
    		}
    	}
    }
1136535
public void addParameters(NameValuePair[] parameters) {
        log.trace("enter PostMethod.addParameters(NameValuePair[])");

        if (parameters == null) {
            log.warn("Attempt to addParameters(null) ignored");
        } else {
            super.clearRequestBody();
            for (int i = 0; i < parameters.length; i++) {
                this.params.add(parameters[i]);
            }
        }
    }
615891
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, CodeExpression.TYPES)
        self.value = codeobj
275198
def add_params(self, p):
        """"""
        new_params = p.copy()
        for key,val in new_params.items():
            if not isinstance(val, collections.Iterable):
                new_params[key] = [new_params[key]]
            #_check_comb_param(key, val)
        self.comb_params.update(new_params)
518427
private static void addGetOpenEngSBModelTail(CtClass clazz) throws CannotCompileException, NotFoundException {
        CtClass[] params = generateClassField();
        CtMethod method = new CtMethod(cp.get(List.class.getName()), "getOpenEngSBModelTail", params, clazz);
        StringBuilder body = new StringBuilder();
        body.append(createTrace("Called getOpenEngSBModelTail"))
            .append(String.format("return new ArrayList(%s.values());", TAIL_FIELD));
        method.setBody(createMethodBody(body.toString()));
        clazz.addMethod(method);
    }
811356
public void addValue(double value)
    {
        if (dataSetSize == dataSet.length)
        {
            // Increase the capacity of the array.
            int newLength = (int) (GROWTH_RATE * dataSetSize);
            double[] newDataSet = new double[newLength];
            System.arraycopy(dataSet, 0, newDataSet, 0, dataSetSize);
            dataSet = newDataSet;
        }
        dataSet[dataSetSize] = value;
        updateStatsWithNewValue(value);
        ++dataSetSize;
    }
33407
def bind_model_cls(self, model_cls):
        """"""
        if self.model_cls:
            raise errors.Error('"{0}" has been already bound to "{1}" and '
                               'could not be rebound to "{2}"'.format(
                                   self, self.model_cls, model_cls))
        self.model_cls = model_cls
        return self