You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/10/03 12:13:23 UTC

svn commit: r452398 - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/types/ kernel/src/org/apache/axis2/context/ kernel/src/org/apache/axis2/description/

Author: chinthaka
Date: Tue Oct  3 03:13:22 2006
New Revision: 452398

URL: http://svn.apache.org/viewvc?view=rev&rev=452398
Log:
Inlining variables. We do not need to call the getter method of the variables which are inside the same class. This might not be correct w.r.t object orientation, but let's consider about the performance as well :)

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Notation.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisMessage.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisModule.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/Parameter.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Notation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Notation.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Notation.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Notation.java Tue Oct  3 03:13:22 2006
@@ -68,24 +68,24 @@
             return false;
         Notation other = (Notation) obj;
         if (name == null) {
-            if (other.getName() != null) {
+            if (other.name != null) {
                 return false;
             }
-        } else if (!name.equals(other.getName())) {
+        } else if (!name.equals(other.name)) {
             return false;
         }
         if (publicURI == null) {
-            if (other.getPublic() != null) {
+            if (other.publicURI != null) {
                 return false;
             }
-        } else if (!publicURI.equals(other.getPublic())) {
+        } else if (!publicURI.equals(other.publicURI)) {
             return false;
         }
         if (systemURI == null) {
-            if (other.getSystem() != null) {
+            if (other.systemURI != null) {
                 return false;
             }
-        } else if (!systemURI.equals(other.getSystem())) {
+        } else if (!systemURI.equals(other.systemURI)) {
             return false;
         }
         return true;

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java Tue Oct  3 03:13:22 2006
@@ -1413,7 +1413,7 @@
       throw new MalformedURIException(
               "Query string can only be set for a generic URI!");
     }
-    else if (getPath() == null) {
+    else if (this.m_path == null) {
       throw new MalformedURIException(
               "Query string cannot be set when path is null!");
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java Tue Oct  3 03:13:22 2006
@@ -1038,7 +1038,7 @@
      * @return boolean
      */
     public boolean isHeaderPresent() {
-        OMElement node = getEnvelope().getFirstElement();
+        OMElement node = this.envelope.getFirstElement();
         if (node ==null)
         {
         	return false;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java Tue Oct  3 03:13:22 2006
@@ -77,7 +77,7 @@
      */
     public EndpointReference getMyEPR(String transport) throws AxisFault {
         axisService.isEnableAllTransports();
-        ConfigurationContext configctx = getConfigurationContext();
+        ConfigurationContext configctx = this.configContext;
         if (configctx != null) {
             ListenerManager lm = configctx.getListenerManager();
             if (!lm.isListenerRunning(transport)) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java Tue Oct  3 03:13:22 2006
@@ -92,12 +92,13 @@
 
     public boolean isParameterLocked(String parameterName) {
 
-        if (getParent() != null && getParent().isParameterLocked(parameterName)) {
+        if (this.parent != null && this.parent.isParameterLocked(parameterName)) {
             return true;
         }
 
-        return getParameter(parameterName) != null
-                && getParameter(parameterName).isLocked();
+        Parameter parameter = getParameter(parameterName);
+        return parameter != null
+                && parameter.isLocked();
     }
 
     public void setParent(AxisDescription parent) {
@@ -281,8 +282,8 @@
             return (AxisConfiguration) this;
         }
 
-        if (getParent() != null) {
-            return getParent().getAxisConfiguration();
+        if (this.parent != null) {
+            return this.parent.getAxisConfiguration();
         }
 
         return null;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisMessage.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisMessage.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisMessage.java Tue Oct  3 03:13:22 2006
@@ -95,7 +95,7 @@
     }
 
     public Object getKey() {
-        return getElementQName();
+        return this.elementQname;
     }
 
     public XmlSchemaElement getSchemaElement() {
@@ -109,7 +109,7 @@
                     Object item = schemaItems.next();
                     if (item instanceof XmlSchemaElement) {
                         XmlSchemaElement xmlSchemaElement = (XmlSchemaElement) item;
-                        if (xmlSchemaElement.getQName().equals(getElementQName())) {
+                        if (xmlSchemaElement.getQName().equals(this.elementQname)) {
                             return xmlSchemaElement;
                         }
                     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisModule.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisModule.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisModule.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisModule.java Tue Oct  3 03:13:22 2006
@@ -187,8 +187,8 @@
         // checking the locked value of parent
         boolean loscked = false;
 
-        if (getParent() != null) {
-            loscked = getParent().isParameterLocked(parameterName);
+        if (this.parent != null) {
+            loscked = this.parent.isParameterLocked(parameterName);
         }
 
         if (loscked) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java Tue Oct  3 03:13:22 2006
@@ -352,7 +352,7 @@
 
             if (null == operationContext) {
                 throw new AxisFault(Messages.getMessage("cannotCorrelateMsg",
-                        this.getName().toString(), msgContext.getRelatesTo().getValue()));
+                        this.name.toString(), msgContext.getRelatesTo().getValue()));
             }
         }
         return operationContext;
@@ -393,22 +393,21 @@
 
         int temp = WSDL20_2004Constants.MEP_CONSTANT_INVALID;
 
-        String messageExchangePattern = getMessageExchangePattern();
-        if (WSDL20_2004Constants.MEP_URI_IN_OUT.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_IN_OUT.equals(messageExchangePattern)) {
+        if (WSDL20_2004Constants.MEP_URI_IN_OUT.equals(mepURI) || WSDL20_2006Constants.MEP_URI_IN_OUT.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_IN_OUT;
-        } else if (WSDL20_2004Constants.MEP_URI_IN_ONLY.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(messageExchangePattern)) {
+        } else if (WSDL20_2004Constants.MEP_URI_IN_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_IN_ONLY;
-        } else if (WSDL20_2004Constants.MEP_URI_IN_OPTIONAL_OUT.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(messageExchangePattern)) {
+        } else if (WSDL20_2004Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI) || WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_IN_OPTIONAL_OUT;
-        } else if (WSDL20_2004Constants.MEP_URI_OUT_IN.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_OUT_IN.equals(messageExchangePattern)) {
+        } else if (WSDL20_2004Constants.MEP_URI_OUT_IN.equals(mepURI) || WSDL20_2006Constants.MEP_URI_OUT_IN.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_OUT_IN;
-        } else if (WSDL20_2004Constants.MEP_URI_OUT_ONLY.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_OUT_ONLY.equals(messageExchangePattern)) {
+        } else if (WSDL20_2004Constants.MEP_URI_OUT_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_OUT_ONLY.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_OUT_ONLY;
-        } else if (WSDL20_2004Constants.MEP_URI_OUT_OPTIONAL_IN.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(messageExchangePattern)) {
+        } else if (WSDL20_2004Constants.MEP_URI_OUT_OPTIONAL_IN.equals(mepURI) || WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_OUT_OPTIONAL_IN;
-        } else if (WSDL20_2004Constants.MEP_URI_ROBUST_IN_ONLY.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(messageExchangePattern)) {
+        } else if (WSDL20_2004Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_ROBUST_IN_ONLY;
-        } else if (WSDL20_2004Constants.MEP_URI_ROBUST_OUT_ONLY.equals(messageExchangePattern) || WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(messageExchangePattern)) {
+        } else if (WSDL20_2004Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI)) {
             temp = WSDL20_2004Constants.MEP_CONSTANT_ROBUST_OUT_ONLY;
         }
 
@@ -537,7 +536,7 @@
     }
 
     public Object getKey() {
-        return getName();
+        return this.name;
     }
 
     public ArrayList getFaultMessages() {
@@ -557,7 +556,7 @@
     }
 
     public String getInputAction() {
-        String result = getSoapAction();
+        String result = this.soapAction;
         if (result == null || "".equals(result)) {
             if (wsamappingList != null && !wsamappingList.isEmpty()) {
                 result = wsamappingList.get(0).toString();

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java Tue Oct  3 03:13:22 2006
@@ -558,7 +558,7 @@
                 TransportListener listener = transportIn.getReceiver();
                 if (listener != null) {
                     try {
-                        EndpointReference[] eprsForService = listener.getEPRsForService(getName(), requestIP);
+                        EndpointReference[] eprsForService = listener.getEPRsForService(this.name, requestIP);
                         if (eprsForService != null) {
                             for (int i = 0; i < eprsForService.length; i++) {
                                 EndpointReference endpointReference = eprsForService[i];
@@ -574,7 +574,7 @@
                 }
             }
         } else {
-            List trs = getExposedTransports();
+            List trs = this.exposedTransports;
             for (int i = 0; i < trs.size(); i++) {
                 String trsName = (String) trs.get(i);
                 TransportInDescription transportIn = axisConfig.getTransportIn(
@@ -583,7 +583,7 @@
                     TransportListener listener = transportIn.getReceiver();
                     if (listener != null) {
                         try {
-                            EndpointReference[] eprsForService = listener.getEPRsForService(getName(), requestIP);
+                            EndpointReference[] eprsForService = listener.getEPRsForService(this.name, requestIP);
                             if (eprsForService != null) {
                                 for (int j = 0; j < eprsForService.length; j++) {
                                     EndpointReference endpointReference = eprsForService[j];
@@ -636,13 +636,13 @@
         } else {
             setWsdlfound(true);
             //pick the endpoint and take it as the epr for the WSDL
-            getWSDL(out, new String[]{getEndpoint()}, "services");
+            getWSDL(out, new String[]{this.endpoint}, "services");
         }
 
     }
 
     private void getWSDL(OutputStream out, String [] serviceURL, String servicePath) throws AxisFault {
-        if (isWsdlfound()) {
+        if (this.wsdlfound) {
             AxisService2OM axisService2WOM = new AxisService2OM(this,
                     serviceURL, "document", "literal", servicePath);
             try {
@@ -695,7 +695,7 @@
         } else {
             setWsdlfound(true);
             //pick the endpoint and take it as the epr for the WSDL
-            getWSDL2(out, new String[]{getEndpoint()});
+            getWSDL2(out, new String[]{this.endpoint});
         }
     }
 
@@ -706,7 +706,7 @@
     }
 
     private void getWSDL2(OutputStream out, String [] serviceURL) throws AxisFault {
-        if (isWsdlfound()) {
+        if (this.wsdlfound) {
             AxisService2WSDL2 axisService2WSDL2 = new AxisService2WSDL2(this, serviceURL);
             try {
                 OMElement wsdlElement = axisService2WSDL2.generateOM();
@@ -983,7 +983,7 @@
     }
 
     public Object getKey() {
-        return getName();
+        return this.name;
     }
 
     public boolean isActive() {
@@ -1368,8 +1368,8 @@
     public void populateSchemaMappings() {
 
         //populate the axis service with the necessary schema references
-        ArrayList schema = getSchema();
-        if (!isSchemaLocationsAdjusted()) {
+        ArrayList schema = this.schemaList;
+        if (!this.schemaLocationsAdjusted) {
             Hashtable nameTable = new Hashtable();
             //calculate unique names for the schemas
             calcualteSchemaNames(schema, nameTable);
@@ -1473,7 +1473,7 @@
             xmlSchemaExternal.setSchemaLocation(
                     customSchemaNamePrefix == null ?
                             //use the default mode
-                            (getName() +
+                            (this.name +
                                     "?xsd=" +
                                     nameTable.get(s)) :
                             //custom prefix is present - add the custom prefix

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java Tue Oct  3 03:13:22 2006
@@ -89,7 +89,7 @@
         AxisConfiguration axisConfig = (AxisConfiguration) getParent();
 
         if (axisConfig != null) {
-            Iterator modules = getEngagedModules().iterator();
+            Iterator modules = this.engagedModules.iterator();
 
             while (modules.hasNext()) {
                 QName moduleName = (QName) modules.next();
@@ -204,7 +204,7 @@
     }
 
     public Object getKey() {
-        return getServiceGroupName();
+        return this.serviceGroupName;
     }
 
     public boolean isEngaged(QName moduleName) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/Parameter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/Parameter.java?view=diff&rev=452398&r1=452397&r2=452398
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/Parameter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/Parameter.java Tue Oct  3 03:13:22 2006
@@ -160,7 +160,7 @@
             return true;
         }
         if(obj instanceof Parameter){
-            return ((Parameter) obj).getName().equals(name);
+            return ((Parameter) obj).name.equals(name);
         }
         return false;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org