TODO To complete.

@param javaClass
@param body
554464
private void writeGetter(final JavaClassSource javaClass, final Property propDef) {
        if (propDef.needGetter()) {
            if (!javaClass.hasMethodSignature(propDef.name())) {

                final StringBuilder javadoc = new StringBuilder();
                javadoc
                       .append("@return the sourcePath\n");

                String body = "";

                if (propDef.isList()) {

                    javaClass.addImport("java.util.stream.Collectors");
                    javaClass.addImport("java.util.ArrayList");

                    body = Templates.use(TemplateName.Getter_List, propDef);

                } else if (propDef.isMap()) {

                    javaClass.addImport("java.util.stream.Collectors");
                    javaClass.addImport("java.util.HashMap");

                    body = Templates.use(TemplateName.Getter_Map, propDef);

                } else {

                    body = Templates.use(TemplateName.Getter, propDef);

                }

                final MethodSource<?> method = javaClass.addMethod()
                                                        .setName(propDef.name())
                                                        .setPublic()
                                                        .setBody(body)
                                                        .setReturnType(propDef.type().qualifiedName());
                method.getJavaDoc().setFullText(javadoc.toString());

            } else {
                // javaClass.getMethod(propDef.getName()).setBody(javaClass.getMethod(propDef.getName()).getBody()
                // + body.toString());
            }
        }
    }
938836
@Override
	public void body() {

		IMessageEvent msg = (IMessageEvent) getReason();
		String content = (String) msg.getParameter("content").getValue();
		if (content.equalsIgnoreCase("NewRecordedCall")) {
			Report report = new Report();

			this.getBeliefbase().getBelief("report").setFact(report);
			this.getBeliefbase().getBelief("createdIssueReport").setFact(true);
		}

	}
522036
public void onServletInvocation (@Nonnull final Class <? extends GenericServlet> aServletClass)
  {
    m_aRWLock.writeLocked ( () -> _getOrCreateServletStatus (aServletClass).internalIncrementInvocationCount ());
  }
205358
public final void classBodyDeclaration() throws RecognitionException {
		int classBodyDeclaration_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 21) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:359:5: ( ';' | ( 'static' )? block | ( modifier )* memberDecl )
			int alt35=3;
			switch ( input.LA(1) ) {
			case 52:
				{
				alt35=1;
				}
				break;
			case 106:
				{
				int LA35_2 = input.LA(2);
				if ( (LA35_2==121) ) {
					alt35=2;
				}
				else if ( (LA35_2==ENUM||LA35_2==Identifier||LA35_2==53||LA35_2==58||LA35_2==63||LA35_2==65||LA35_2==67||(LA35_2 >= 71 && LA35_2 <= 72)||LA35_2==77||LA35_2==83||LA35_2==85||(LA35_2 >= 92 && LA35_2 <= 94)||LA35_2==96||(LA35_2 >= 100 && LA35_2 <= 102)||(LA35_2 >= 105 && LA35_2 <= 107)||LA35_2==110||LA35_2==114||(LA35_2 >= 118 && LA35_2 <= 119)) ) {
					alt35=3;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 35, 2, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case 121:
				{
				alt35=2;
				}
				break;
			case ENUM:
			case Identifier:
			case 53:
			case 58:
			case 63:
			case 65:
			case 67:
			case 71:
			case 72:
			case 77:
			case 83:
			case 85:
			case 92:
			case 93:
			case 94:
			case 96:
			case 100:
			case 101:
			case 102:
			case 105:
			case 107:
			case 110:
			case 114:
			case 118:
			case 119:
				{
				alt35=3;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 35, 0, input);
				throw nvae;
			}
			switch (alt35) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:359:7: ';'
					{
					match(input,52,FOLLOW_52_in_classBodyDeclaration671); if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:360:7: ( 'static' )? block
					{
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:360:7: ( 'static' )?
					int alt33=2;
					int LA33_0 = input.LA(1);
					if ( (LA33_0==106) ) {
						alt33=1;
					}
					switch (alt33) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:360:7: 'static'
							{
							match(input,106,FOLLOW_106_in_classBodyDeclaration679); if (state.failed) return;
							}
							break;

					}

					pushFollow(FOLLOW_block_in_classBodyDeclaration682);
					block();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:361:7: ( modifier )* memberDecl
					{
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:361:7: ( modifier )*
					loop34:
					while (true) {
						int alt34=2;
						int LA34_0 = input.LA(1);
						if ( (LA34_0==58) ) {
							int LA34_6 = input.LA(2);
							if ( (LA34_6==Identifier) ) {
								alt34=1;
							}

						}
						else if ( (LA34_0==63||LA34_0==83||LA34_0==96||(LA34_0 >= 100 && LA34_0 <= 102)||(LA34_0 >= 106 && LA34_0 <= 107)||LA34_0==110||LA34_0==114||LA34_0==119) ) {
							alt34=1;
						}

						switch (alt34) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:361:7: modifier
							{
							pushFollow(FOLLOW_modifier_in_classBodyDeclaration690);
							modifier();
							state._fsp--;
							if (state.failed) return;
							}
							break;

						default :
							break loop34;
						}
					}

					pushFollow(FOLLOW_memberDecl_in_classBodyDeclaration693);
					memberDecl();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 21, classBodyDeclaration_StartIndex); }

		}
	}
516374
@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {
      if (def.isUseAnnotation())
      {
         out.write("@AdministeredObject(adminObjectInterfaces = { ");
         out.write(def.getAdminObjects().get(numOfAo).getAdminObjectInterface());
         out.write(".class })\n");
      }
      out.write("public class " + getClassName(def) + " implements " +
            def.getAdminObjects().get(numOfAo).getAdminObjectInterface());
      if (def.isAdminObjectImplRaAssociation())
      {
         out.write(",\n");
         writeIndent(out, 1);
         out.write("ResourceAdapterAssociation, Referenceable, Serializable");
      }
      writeLeftCurlyBracket(out, 0);
      int indent = 1;

      writeIndent(out, indent);
      out.write("/** Serial version uid */\n");
      writeIndent(out, indent);
      out.write("private static final long serialVersionUID = 1L;\n\n");

      if (def.isAdminObjectImplRaAssociation())
      {
         writeWithIndent(out, indent, "/** The resource adapter */\n");
         writeIndent(out, indent);
         if (def.isRaSerial())
         {
            out.write("private ResourceAdapter ra;\n\n");
         }
         else
         {
            out.write("private transient ResourceAdapter ra;\n\n");
         }

         writeWithIndent(out, indent, "/** Reference */\n");
         writeWithIndent(out, indent, "private Reference reference;\n\n");
      }
      writeConfigPropsDeclare(def, out, indent);

      writeDefaultConstructor(def, out, indent);

      writeConfigProps(def, out, indent);

      if (def.isAdminObjectImplRaAssociation())
      {
         writeResourceAdapter(def, out, indent);
         writeReference(def, out, indent);
      }
      writeHashCode(def, out, indent);
      writeEquals(def, out, indent);

      writeRightCurlyBracket(out, 0);
   }
1349556
public void writeMethod(SourceWriter writer, String signature, String body) {
    writer.println(signature + " {");
    writer.indent();
    writer.println(body);
    writer.outdent();
    writer.println("}");
    writer.println();
  }
1250770
public void setBody(String body)
    {
    	String xbody = body;
    	String [] row = xbody.split("\n");
    	for(int i=0; i<row.length; i++){
    		this.m_xbody.add(row[i]);
    	}
    }
300263
public static void scanner(Class<?> implementObjectClass, Class<?>... proxyClass) {

        if (AopCache.isScannedClass(implementObjectClass)) {
            return;
        }
        Method[] methods = ReflectUtil.getAllMethod(implementObjectClass);

        if (methods != null) {

            AopConfig config = null;
            Before before = null;
            After after = null;
            Class<?>[] argsType;

            for (Method method : methods) {

                config = new AopConfig();
                argsType = method.getParameterTypes();

                if (argsType != null && argsType.length > 0) {
                    for (Class<?> clazz : argsType) {
                        config.setArgs(clazz.getName());
                    }
                }

                before = method.getAnnotation(Before.class);
                after = method.getAnnotation(After.class);

                config.setMethodName(method.getName());
                if (proxyClass != null && proxyClass.length > 0) {
                    config.setClassPath(proxyClass[0].getName());
                } else {
                    config.setClassPath(implementObjectClass.getName());
                }

                if (before == null && after == null) {
                    config.setUsedAop(false);
                } else {
                    config.setUsedAop(true);
                    if (before != null) {
                        config.setBefore(before);
                        try {
                            Object instance = AopCache.getCutPoint(before.cutClass());
                            if (instance != null) {
                                config.setBeforeInstance(instance);
                            } else {
                                instance = before.cutClass().newInstance();
                                config.setBeforeInstance(instance);
                                AopCache.putCutPoint(instance);
                            }
                        } catch (InstantiationException e) {
                            e.printStackTrace();
                        } catch (IllegalAccessException e) {
                            e.printStackTrace();
                        }
                    }
                    if (after != null) {
                        config.setAfter(after);
                        try {
                            Object instance = AopCache.getCutPoint(after.cutClass());
                            if (instance != null) {
                                config.setAfterInstance(instance);
                            } else {
                                instance = after.cutClass().newInstance();
                                config.setAfterInstance(instance);
                                AopCache.putCutPoint(instance);
                            }
                        } catch (InstantiationException e) {
                            e.printStackTrace();
                        } catch (IllegalAccessException e) {
                            e.printStackTrace();
                        }
                    }
                }

                AopCache.putAopConfig(config);
            }
        }
    }
684879
public int doAfterBody() throws JspException
    {
        String text = bodyContent.getString();
        if (text != null) {
            bodyContent.clearBody();
            text = text.trim();
            if (text.length() > 0)
                _text = text;
        }
        return SKIP_BODY;
    }
626744
@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {
      int indent = 1;
      if (def.isUseAnnotation())
      {
         if (!def.getMcfDefs().get(getNumOfMcf()).isUseCciConnection())
         {
            out.write("@ConnectionDefinition(connectionFactory = " +
                  def.getMcfDefs().get(getNumOfMcf()).getCfInterfaceClass() + ".class,\n");
            writeWithIndent(out, indent,
                  " connectionFactoryImpl = " + def.getMcfDefs().get(getNumOfMcf()).getCfClass() + ".class,\n");
            writeWithIndent(out, indent,
                  " connection = " + def.getMcfDefs().get(getNumOfMcf()).getConnInterfaceClass() + ".class,\n");
            writeWithIndent(out, indent,
                  " connectionImpl = " + def.getMcfDefs().get(getNumOfMcf()).getConnImplClass() + ".class)\n");
         }
         else
         {
            out.write("@ConnectionDefinition(connectionFactory = ConnectionFactory.class,\n");
            writeWithIndent(out, indent, " connectionFactoryImpl = " +
                  def.getMcfDefs().get(getNumOfMcf()).getCciConnFactoryClass() + ".class,\n");

            writeWithIndent(out, indent, " connection = Connection.class,\n");
            writeWithIndent(out, indent,
                  " connectionImpl = " + def.getMcfDefs().get(getNumOfMcf()).getCciConnClass() + ".class)\n");
         }
      }

      out.write("public class " + getClassName(def) + " implements ManagedConnectionFactory");
      if (def.getMcfDefs().get(getNumOfMcf()).isImplRaAssociation())
      {
         out.write(", ResourceAdapterAssociation");
      }
      writeLeftCurlyBracket(out, 0);
      writeEol(out);

      writeWithIndent(out, indent, "/** The serial version UID */\n");
      writeWithIndent(out, indent, "private static final long serialVersionUID = 1L;\n\n");

      writeWithIndent(out, indent, "/** The logger */\n");
      writeWithIndent(out, indent, "private static Logger log = Logger.getLogger(" + getSelfClassName(def) + ");\n\n");
      if (def.getMcfDefs().get(getNumOfMcf()).isImplRaAssociation())
      {
         writeWithIndent(out, indent, "/** The resource adapter */\n");
         writeIndent(out, indent);
         if (def.isRaSerial())
         {
            out.write("private ResourceAdapter ra;");
         }
         else
         {
            out.write("private transient ResourceAdapter ra;");
         }
         writeEol(out);
         writeEol(out);
      }

      writeWithIndent(out, indent, "/** The logwriter */\n");
      writeWithIndent(out, indent, "private PrintWriter logwriter;\n\n");

      writeConfigPropsDeclare(def, out, indent);

      writeDefaultConstructor(def, out, indent);

      writeConfigProps(def, out, indent);
      writeConnectionFactory(def, out, indent);
      writeManagedConnection(def, out, indent);
      writeLogWriter(def, out, indent);
      if (def.getMcfDefs().get(getNumOfMcf()).isImplRaAssociation())
      {
         writeResourceAdapter(def, out, indent);
      }

      writeHashCode(def, out, indent);
      writeEquals(def, out, indent);

      writeRightCurlyBracket(out, 0);
   }
125393
@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {
      out.write("public class " + getClassName(def));
      writeLeftCurlyBracket(out, 0);
      writeEol(out);

      int indent = 1;

      writeWithIndent(out, indent, "/** The resource adapter */\n");
      writeWithIndent(out, indent, "private " + def.getRaClass() + " ra;\n\n");

      writeWithIndent(out, indent, "/** Activation spec */\n");
      writeWithIndent(out, indent, "private " + def.getAsClass() + " spec;\n\n");

      writeWithIndent(out, indent, "/** The message endpoint factory */\n");
      writeWithIndent(out, indent, "private MessageEndpointFactory endpointFactory;\n\n");

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Default constructor\n");
      writeWithIndent(out, indent, " * @exception ResourceException Thrown if an error occurs\n");
      writeWithIndent(out, indent, " */\n");
      writeWithIndent(out, indent, "public " + getClassName(def) + "() throws ResourceException");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "this(null, null, null);");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      //constructor
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Constructor\n");
      writeWithIndent(out, indent, " * @param ra " + def.getRaClass());
      writeEol(out);
      writeWithIndent(out, indent, " * @param endpointFactory MessageEndpointFactory\n");
      writeWithIndent(out, indent, " * @param spec " + def.getAsClass());
      writeEol(out);
      writeWithIndent(out, indent, " * @exception ResourceException Thrown if an error occurs\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "public " + getClassName(def) + "(" + def.getRaClass() + " ra, \n");
      writeWithIndent(out, indent + 1, "MessageEndpointFactory endpointFactory,\n");
      writeWithIndent(out, indent + 1, def.getAsClass() + " spec) throws ResourceException\n");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "this.ra = ra;\n");
      writeWithIndent(out, indent + 1, "this.endpointFactory = endpointFactory;\n");
      writeWithIndent(out, indent + 1, "this.spec = spec;");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeGetAs(def, out, indent);
      writeMef(def, out, indent);
      writeStartStop(def, out, indent);

      writeRightCurlyBracket(out, 0);
   }
223281
@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {

      out.write("public class " + getClassName(def) + " implements Connection");
      writeLeftCurlyBracket(out, 0);
      int indent = 1;

      writeDefaultConstructor(def, out, indent);

      //constructor
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Default constructor\n");
      writeWithIndent(out, indent, " * @param connSpec ConnectionSpec\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "public " + getClassName(def) + "(ConnectionSpec connSpec)");
      writeLeftCurlyBracket(out, indent);
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeClose(def, out, indent);
      writeInteraction(def, out, indent);
      writeLocalTransaction(def, out, indent);
      writeMetaData(def, out, indent);
      writeResultSetInfo(def, out, indent);

      writeEol(out);
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Set ManagedConnection\n");
      writeWithIndent(out, indent, " */\n");
      writeWithIndent(out, indent,
            "void setManagedConnection(" + def.getMcfDefs().get(getNumOfMcf()).getMcClass() + " mc)");
      writeLeftCurlyBracket(out, indent);
      writeRightCurlyBracket(out, indent);

      writeRightCurlyBracket(out, 0);
   }
925464
@SuppressWarnings("unchecked")
    public static void after(Object request, Object response) {

        HttpData data = new HttpData();

        /*
         * Use reflection to access the HttpServletRequest/Response as using the
         * true method signature caused ClassLoader issues.
         */
        Class<?> reqClass = request.getClass();
        Class<?> respClass = response.getClass();
        try {
            /*
             * Retrieve the request tracker
             */
            Method getAttribute = reqClass.getMethod(GET_ATTRIBUTE, String.class);
            Method setAttribute = reqClass.getMethod(SET_ATTRIBUTE, String.class, Object.class);
            HttpRequestTracker tracker = (HttpRequestTracker) (getAttribute.invoke(request, TRACKER_ATTRIBUTE));
            if (tracker == null) {
                /*
                 * should never happen
                 */
                throw new JavametricsException("Unable to find request tracker");
            }

            /*
             * Decrement the nesting level and return if still nested
             */
            if (tracker.decrement()) {
                setAttribute.invoke(request, TRACKER_ATTRIBUTE, tracker);
                return;
            }

            /*
             * Clear the tracker
             */
            setAttribute.invoke(request, TRACKER_ATTRIBUTE, null);

            data.setRequestTime(tracker.getRequestTime());

            Method getRequestURL = reqClass.getMethod(GET_REQUEST_URL);
            data.setUrl(((StringBuffer) getRequestURL.invoke(request)).toString());

            Method getMethod = reqClass.getMethod(GET_METHOD);
            data.setMethod((String) getMethod.invoke(request));

            Method getStatus = respClass.getMethod(GET_STATUS);
            data.setStatus((Integer) getStatus.invoke(response));

            if (detailed) {
                Method getContentType = respClass.getMethod(GET_CONTENT_TYPE);
                data.setContentType((String) getContentType.invoke(response));

                Method getHeaders = respClass.getMethod(GET_HEADER_NAMES);
                Method getHeader = respClass.getMethod(GET_HEADER, String.class);
                Collection<String> headers = (Collection<String>) getHeaders.invoke(response);
                if (headers != null) {
                    for (String headerName : headers) {
                        String header = (String) getHeader.invoke(response, headerName);
                        if (header != null) {
                            data.addHeader(headerName, header);
                        }
                    }
                }

                Method getReqHeaders = reqClass.getMethod(GET_HEADER_NAMES);
                Method getReqHeader = reqClass.getMethod(GET_HEADER, String.class);
                Enumeration<String> reqHeaders = (Enumeration<String>) getReqHeaders.invoke(request);
                if (reqHeaders != null) {
                    while (reqHeaders.hasMoreElements()) {
                        String headerName = reqHeaders.nextElement();
                        String header = (String) getReqHeader.invoke(request, headerName);
                        if (header != null) {
                            data.addRequestHeader(headerName, header);
                        }
                    }
                }
            }
            
            data.setDuration(System.currentTimeMillis() - tracker.getRequestTime());

            if (Agent.debug) {
                System.err.println("Javametrics: Sending {\"http\":" + data.toJsonString() + "}");
            }

            /*
             * Send the http request data to the Javametrics agent
             */
            Javametrics.getInstance().sendJSON(HTTP_TOPIC, data.toJsonString());

        } catch (Exception e) {
            // Log any exception caused by our injected code
            System.err.println("Javametrics: Servlet callback exception: " + e.toString());
            e.printStackTrace();
        }

    }
879203
public <T> void beanClass(Class<T> beanClass)
  {
    validateBeanClass(beanClass);
    
    if (Modifier.isAbstract(beanClass.getModifiers())
        && ! abstractMethods(beanClass)) {
      throw error(L.l("abstract bean class '{0}' is invalid because the abstract methods can't be generated.",
                      beanClass.getSimpleName()));
    }
  }
1025772
public void clearBody() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "clearBody");
    softRefToDocument = null;
    clearCachedLengths();
    getPayload().setChoiceField(JmsTextBodyAccess.BODY, JmsTextBodyAccess.IS_BODY_EMPTY);
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "clearBody");
  }
1027336
public static void bodyContainsIllegalCode(Method method, Exception additionalInformation){
		Class<?> clazz = method.getClazz();
		if(isNull(clazz)) clazz = JMapper.class;
		
		String originalName = method.getOriginalName();
		if(isNull(originalName)) originalName = method.getName();
		
		String message = clazz != JMapper.class ? MSG.INSTANCE.message(conversionBodyIllegalCode,clazz.getSimpleName(),originalName,""+additionalInformation.getMessage())
				                                : MSG.INSTANCE.message(conversionBodyIllegalCode2,""+additionalInformation.getMessage());
		
		throw new ConversionBodyIllegalCodeException(message);
	}
336734
@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {
      int indent = 1;
      out.write("public class " + getClassName(def) + " implements ManagedConnection");
      writeLeftCurlyBracket(out, 0);
      writeEol(out);

      writeWithIndent(out, indent, "/** The logger */\n");
      writeWithIndent(out, indent, "private static Logger log = Logger.getLogger(" + getSelfClassName(def) + ");\n\n");

      writeWithIndent(out, indent, "/** The logwriter */\n");
      writeWithIndent(out, indent, "private PrintWriter logwriter;\n\n");

      writeWithIndent(out, indent, "/** ManagedConnectionFactory */\n");
      writeWithIndent(out, indent, "private " + def.getMcfDefs().get(getNumOfMcf()).getMcfClass() + " mcf;\n\n");

      writeWithIndent(out, indent, "/** Listeners */\n");
      writeWithIndent(out, indent, "private List<ConnectionEventListener> listeners;\n\n");

      writeWithIndent(out, indent, "/** Connections */\n");
      if (def.getMcfDefs().get(getNumOfMcf()).isUseCciConnection())
         writeWithIndent(out, indent,
               "private Set<" + def.getMcfDefs().get(getNumOfMcf()).getCciConnClass() + "> connections;\n\n");
      else
         writeWithIndent(out, indent,
               "private Set<" + def.getMcfDefs().get(getNumOfMcf()).getConnImplClass() + "> connections;\n\n");

      if (def.isSupportEis())
      {
         writeWithIndent(out, indent, "/** Socket */\n");
         writeWithIndent(out, indent, "private Socket socket;\n\n");
      }

      //constructor
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Default constructor\n");
      writeWithIndent(out, indent, " * @param mcf mcf\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent,
            "public " + getClassName(def) + "(" + def.getMcfDefs().get(getNumOfMcf()).getMcfClass() + " mcf)");
      if (def.isSupportEis())
      {
         out.write(" throws ResourceException");
      }
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "this.mcf = mcf;\n");
      writeWithIndent(out, indent + 1, "this.logwriter = null;\n");
      writeWithIndent(out, indent + 1,
            "this.listeners = Collections.synchronizedList(new ArrayList<ConnectionEventListener>(1));\n");
      if (def.getMcfDefs().get(getNumOfMcf()).isUseCciConnection())
         writeWithIndent(out, indent + 1,
               "this.connections = new HashSet<" + def.getMcfDefs().get(getNumOfMcf()).getCciConnClass() + ">();");
      else
         writeWithIndent(out, indent + 1,
               "this.connections = new HashSet<" + def.getMcfDefs().get(getNumOfMcf()).getConnImplClass() + ">();");

      if (def.isSupportEis())
      {
         writeEol(out);
         writeWithIndent(out, indent + 1, "this.socket = null; // TODO: Initialize me");
      }

      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeConnection(def, out, indent);
      writeLifecycle(def, out, indent);
      writeConnectionEventListener(def, out, indent);
      writeLogWriter(def, out, indent);
      writeTransaction(def, out, indent);
      writeMetaData(def, out, indent);
      writeMethod(def, out, indent);

      writeRightCurlyBracket(out, 0);
   }