Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 71651 invoked from network); 8 Oct 2007 18:51:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2007 18:51:59 -0000 Received: (qmail 45494 invoked by uid 500); 8 Oct 2007 18:51:47 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 45467 invoked by uid 500); 8 Oct 2007 18:51:46 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 45455 invoked by uid 99); 8 Oct 2007 18:51:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 11:51:46 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 18:51:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B74211A9846; Mon, 8 Oct 2007 11:50:59 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r582932 [3/3] - in /geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.sources: ./ META-INF/ schema/ src/ src/org/ src/org/apache/ src/org/apache/geronimo/ src/org/apache/geronimo/devtools/ src/org/apache/geronimo/devtools... Date: Mon, 08 Oct 2007 18:50:56 -0000 To: scm@geronimo.apache.org From: linsun@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071008185059.B74211A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.sources/src/org/apache/geronimo/devtools/j2g/sources/environment/VarContext.java URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.sources/src/org/apache/geronimo/devtools/j2g/sources/environment/VarContext.java?rev=582932&view=auto ============================================================================== --- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.sources/src/org/apache/geronimo/devtools/j2g/sources/environment/VarContext.java (added) +++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.sources/src/org/apache/geronimo/devtools/j2g/sources/environment/VarContext.java Mon Oct 8 11:50:53 2007 @@ -0,0 +1,72 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.geronimo.devtools.j2g.sources.environment; + +/** + * Class represents JNDI name, scope and correctness presented by javax.naming.Context variable. + */ +public class VarContext +{ + /** + * Correctness flag. + */ + private boolean valid; + + /** + * Position ends of scope in a compilation unit there variable was declared. + */ + private int areaEnd; + + /** + * JNDI name which variable presents. + */ + private String jndiName; + + /** + * Constructor. + */ + public VarContext(String jndiName, int end, boolean valid) + { + this.areaEnd = end; + this.valid = valid; + this.jndiName = jndiName; + } + + /** + * @return end of variable scope in a current compilation unit. + */ + public int getAreaEnd() + { + return areaEnd; + } + + /** + * @return true if variable is correct. + */ + public boolean isValid() + { + return valid; + } + + /** + * @return JNDI name which presented by variable. + */ + public String getJNDIName() + { + return jndiName; + } +} Propchange: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.sources/src/org/apache/geronimo/devtools/j2g/sources/environment/VarContext.java ------------------------------------------------------------------------------ svn:eol-style = native