repo stringlengths 1 191 ⌀ | file stringlengths 23 351 | code stringlengths 0 5.32M | file_length int64 0 5.32M | avg_line_length float64 0 2.9k | max_line_length int64 0 288k | extension_type stringclasses 1 value |
|---|---|---|---|---|---|---|
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/expr/FunctionalExpression.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.expr;
import columbus.java.asg.type.Type;
/**
* Interface FunctionalExpression, which represents the {@link columbus.java.asg.expr.FunctionalExpression FunctionalExpression} node.
* @columbus.node (missing)
* @columbus.edge target ({@link columbus.java.asg.type.Type Type}, single) : (missing)
*/
public interface FunctionalExpression extends PolyExpression {
/**
* Gives back the reference of the node the {@link columbus.java.asg.expr.FunctionalExpression#edgeTarget target} edge points to.
* @return Returns the end point of the target edge.
*/
public Type getTarget();
/**
* Sets the {@link columbus.java.asg.expr.FunctionalExpression#edgeTarget target} edge.
* @param id The new end point of the target edge.
*/
public void setTarget(int id);
/**
* Sets the {@link columbus.java.asg.expr.FunctionalExpression#edgeTarget target} edge.
* @param node The new end point of the target edge.
*/
public void setTarget(Type node);
}
| 1,722 | 32.134615 | 134 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/expr/InfixExpressionImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.expr;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.type.Type;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.expr.InfixExpression InfixExpression} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class InfixExpressionImpl extends BaseImpl implements InfixExpression {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(InfixExpressionImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _type;
protected int _hasLeftOperand;
protected int _hasRightOperand;
protected InfixOperatorKind operator = InfixOperatorKind.iokPlus;
public InfixExpressionImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkInfixExpression;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public InfixOperatorKind getOperator() {
return operator;
}
@Override
public void setOperator(InfixOperatorKind _operator) {
operator = _operator;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Type getType() {
if (_type == 0)
return null;
if (factory.getIsFiltered(_type))
return null;
return (Type)factory.getRef(_type);
}
@Override
public void setType(int _id) {
if (_type != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","type" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkType)) {
_type = _id;
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setType(Type _node) {
if (_type != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","type" ));
_type = _node.getId();
}
@Override
public Expression getLeftOperand() {
if (_hasLeftOperand == 0)
return null;
if (factory.getIsFiltered(_hasLeftOperand))
return null;
return (Expression)factory.getRef(_hasLeftOperand);
}
@Override
public Expression getRightOperand() {
if (_hasRightOperand == 0)
return null;
if (factory.getIsFiltered(_hasRightOperand))
return null;
return (Expression)factory.getRef(_hasRightOperand);
}
@Override
public void setLeftOperand(int _id) {
if (_hasLeftOperand != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasLeftOperand" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasLeftOperand = _id;
setParentEdge(_hasLeftOperand);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setLeftOperand(Expression _node) {
if (_hasLeftOperand != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasLeftOperand" ));
_hasLeftOperand = _node.getId();
setParentEdge(_hasLeftOperand);
}
@Override
public void setRightOperand(int _id) {
if (_hasRightOperand != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasRightOperand" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasRightOperand = _id;
setParentEdge(_hasRightOperand);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setRightOperand(Expression _node) {
if (_hasRightOperand != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasRightOperand" ));
_hasRightOperand = _node.getId();
setParentEdge(_hasRightOperand);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_type) ? _type : 0);
io.writeInt4(!factory.getIsFiltered(_hasLeftOperand) ? _hasLeftOperand : 0);
io.writeInt4(!factory.getIsFiltered(_hasRightOperand) ? _hasRightOperand : 0);
io.writeUByte1(operator.ordinal());
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_type = io.readInt4();
_hasLeftOperand = io.readInt4();
if (_hasLeftOperand != 0)
setParentEdge(_hasLeftOperand);
_hasRightOperand = io.readInt4();
if (_hasRightOperand != 0)
setParentEdge(_hasRightOperand);
operator = InfixOperatorKind.values()[io.readUByte1()];
}
}
| 9,594 | 24.932432 | 137 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/expr/PrefixExpression.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.expr;
import columbus.java.asg.enums.*;
/**
* Interface PrefixExpression, which represents the {@link columbus.java.asg.expr.PrefixExpression PrefixExpression} node.
* @columbus.node (missing)
* @columbus.attr operator ({@link columbus.java.asg.enums.PrefixOperatorKind PrefixOperatorKind}) : (missing)
*/
public interface PrefixExpression extends Unary {
/**
* Gives back the {@link columbus.java.asg.expr.PrefixExpression#attributeOperator operator} of the node.
* @return Returns with the operator.
*/
public PrefixOperatorKind getOperator();
/**
* Sets the {@link columbus.java.asg.expr.PrefixExpression#attributeOperator operator} of the node.
* @param value The new value of the operator.
*/
public void setOperator(PrefixOperatorKind value);
}
| 1,534 | 32.369565 | 122 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/expr/FloatLiteralImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.expr;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.type.Type;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.expr.FloatLiteral FloatLiteral} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class FloatLiteralImpl extends BaseImpl implements FloatLiteral {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(FloatLiteralImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _type;
protected int value;
protected float floatValue;
public FloatLiteralImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkFloatLiteral;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public String getValue() {
return factory.getStringTable().get(value);
}
@Override
public int getValueKey() {
return value;
}
@Override
public void setValue(String _value) {
value = factory.getStringTable().set(_value);
}
@Override
public float getFloatValue() {
return floatValue;
}
@Override
public void setFloatValue(float _floatValue) {
floatValue = _floatValue;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Type getType() {
if (_type == 0)
return null;
if (factory.getIsFiltered(_type))
return null;
return (Type)factory.getRef(_type);
}
@Override
public void setType(int _id) {
if (_type != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","type" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkType)) {
_type = _id;
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setType(Type _node) {
if (_type != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","type" ));
_type = _node.getId();
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_type) ? _type : 0);
io.writeInt4(value);
io.writeFloat4(floatValue);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_type = io.readInt4();
value = io.readInt4();
floatValue = io.readFloat4();
}
}
| 7,207 | 22.710526 | 134 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/expr/PostfixExpression.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.expr;
import columbus.java.asg.enums.*;
/**
* Interface PostfixExpression, which represents the {@link columbus.java.asg.expr.PostfixExpression PostfixExpression} node.
* @columbus.node (missing)
* @columbus.attr operator ({@link columbus.java.asg.enums.PostfixOperatorKind PostfixOperatorKind}) : (missing)
*/
public interface PostfixExpression extends Unary {
/**
* Gives back the {@link columbus.java.asg.expr.PostfixExpression#attributeOperator operator} of the node.
* @return Returns with the operator.
*/
public PostfixOperatorKind getOperator();
/**
* Sets the {@link columbus.java.asg.expr.PostfixExpression#attributeOperator operator} of the node.
* @param value The new value of the operator.
*/
public void setOperator(PostfixOperatorKind value);
}
| 1,544 | 32.586957 | 125 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/expr/StringLiteral.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.expr;
/**
* Interface StringLiteral, which represents the {@link columbus.java.asg.expr.StringLiteral StringLiteral} node.
* @columbus.node (missing)
* @columbus.attr value (String) : (missing)
* @columbus.attr formatString (String) : (missing)
*/
public interface StringLiteral extends Literal {
/**
* Gives back the {@link columbus.java.asg.expr.StringLiteral#attributeValue value} of the node.
* @return Returns with the value.
*/
public String getValue();
/**
* Gives back the Key of {@link columbus.java.asg.expr.StringLiteral#attributeValue value} of the node.
* @return Returns with the Key of the value.
*/
public int getValueKey();
/**
* Sets the {@link columbus.java.asg.expr.StringLiteral#attributeValue value} of the node.
* @param value The new value of the value.
*/
public void setValue(String value);
/**
* Gives back the {@link columbus.java.asg.expr.StringLiteral#attributeFormatString formatString} of the node.
* @return Returns with the formatString.
*/
public String getFormatString();
/**
* Gives back the Key of {@link columbus.java.asg.expr.StringLiteral#attributeFormatString formatString} of the node.
* @return Returns with the Key of the formatString.
*/
public int getFormatStringKey();
/**
* Sets the {@link columbus.java.asg.expr.StringLiteral#attributeFormatString formatString} of the node.
* @param value The new value of the formatString.
*/
public void setFormatString(String value);
}
| 2,243 | 31.057143 | 118 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/MethodKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum MethodKind {
mekNormal,
mekConstructor,
mekGeneratedDefaultConstructor,
mekGeneratedAnonymousClassConstructor;
}
| 896 | 27.935484 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/MemberReferenceModeKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum MemberReferenceModeKind {
mrmkInvoke,
mrmkNew;
}
| 830 | 27.655172 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/LambdaParameterKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum LambdaParameterKind {
lpkImplicit,
lpkExplicit;
}
| 831 | 27.689655 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/MemberReferenceOverloadKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum MemberReferenceOverloadKind {
mrokOverloaded,
mrokUnoverloaded;
}
| 847 | 28.241379 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/AssignmentOperatorKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum AssignmentOperatorKind {
askAssign,
askPlusAssign,
askMinusAssign,
askTimesAssign,
askDivideAssign,
askRemainderAssign,
askAndAssign,
askOrAssign,
askXorAssign,
askLeftShiftAssign,
askSignedRightShiftAssign,
askUnsignedRightShiftAssign;
}
| 1,030 | 25.435897 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/ModuleKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum ModuleKind {
mkOpen,
mkStrong;
}
| 814 | 27.103448 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/PostfixOperatorKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum PostfixOperatorKind {
pookIncrement,
pookDecrement;
}
| 835 | 27.827586 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/PolyExpressionKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum PolyExpressionKind {
pekStandalone,
pekPoly;
}
| 828 | 27.586207 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/LambdaBodyKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum LambdaBodyKind {
lbkExpression,
lbkStatement;
}
| 829 | 27.62069 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/EdgeKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum EdgeKind {
edkCommentable_Comments,
edkAnnotatedTypeExpression_HasAnnotations,
edkAnnotatedTypeExpression_HasUnderlyingType,
edkAnnotation_HasAnnotationName,
edkArrayTypeExpression_HasComponentType,
edkBinary_HasLeftOperand,
edkBinary_HasRightOperand,
edkClassLiteral_HasComponentType,
edkConditional_HasCondition,
edkConditional_HasTrueExpression,
edkConditional_HasFalseExpression,
edkErroneous_HasErrors,
edkErroneousTypeExpression_HasErrors,
edkExpression_Type,
edkFunctionalExpression_Target,
edkIdentifier_RefersTo,
edkInstanceOf_HasTypeOperand,
edkLambda_HasParameters,
edkLambda_HasBody,
edkMemberReference_HasQualifierExpression,
edkMemberReference_HasTypeArguments,
edkMemberReference_ReferredMethod,
edkMethodInvocation_HasTypeArguments,
edkMethodInvocation_HasArguments,
edkMethodInvocation_Invokes,
edkNewArray_HasComponentType,
edkNewArray_HasDimensions,
edkNewArray_HasInitializers,
edkNewClass_HasEnclosingExpression,
edkNewClass_HasTypeArguments,
edkNewClass_HasTypeName,
edkNewClass_HasArguments,
edkNewClass_HasAnonymousClass,
edkNewClass_Constructor,
edkNormalAnnotation_HasArguments,
edkQualifiedTypeExpression_HasQualifierType,
edkQualifiedTypeExpression_HasSimpleType,
edkSingleElementAnnotation_HasArgument,
edkTypeApplyExpression_HasRawType,
edkTypeApplyExpression_HasTypeArguments,
edkTypeCast_HasTypeOperand,
edkTypeIntersectionExpression_HasBounds,
edkTypeUnionExpression_HasAlternatives,
edkUnary_HasOperand,
edkWildcardExpression_HasBound,
edkExports_HasPackageName,
edkExports_HasModuleNames,
edkOpens_HasPackageName,
edkOpens_HasModuleNames,
edkProvides_HasServiceName,
edkProvides_HasImplementationNames,
edkRequires_HasModuleName,
edkUses_HasServiceName,
edkAssert_HasCondition,
edkAssert_HasDetail,
edkBasicFor_HasInitializers,
edkBasicFor_HasCondition,
edkBasicFor_HasUpdates,
edkBlock_HasStatements,
edkCase_HasExpression,
edkDo_HasCondition,
edkEnhancedFor_HasParameter,
edkEnhancedFor_HasExpression,
edkExpressionStatement_HasExpression,
edkHandler_HasParameter,
edkHandler_HasBlock,
edkIf_HasSubstatement,
edkIf_HasFalseSubstatement,
edkIteration_HasSubstatement,
edkJump_Target,
edkLabeledStatement_HasStatement,
edkReturn_HasExpression,
edkSelection_HasCondition,
edkSwitch_HasCases,
edkSwitchLabel_HasStatements,
edkSynchronized_HasLock,
edkSynchronized_HasBlock,
edkThrow_HasExpression,
edkTry_HasResources,
edkTry_HasBlock,
edkTry_HasHandlers,
edkTry_HasFinallyBlock,
edkWhile_HasCondition,
edkAnnotatedElement_HasAnnotations,
edkAnnotationTypeElement_HasDefaultValue,
edkCompilationUnit_HasPackageDeclaration,
edkCompilationUnit_HasImports,
edkCompilationUnit_HasOthers,
edkCompilationUnit_HasModuleDeclaration,
edkCompilationUnit_TypeDeclarations,
edkCompilationUnit_IsInModule,
edkEnumConstant_HasNewClass,
edkGenericDeclaration_HasTypeParameters,
edkImport_HasTarget,
edkInitializerBlock_HasBody,
edkMethodDeclaration_HasReturnType,
edkMethodDeclaration_MethodType,
edkMethodDeclaration_Overrides,
edkModule_Packages,
edkModuleDeclaration_HasName,
edkModuleDeclaration_HasDirectives,
edkModuleDeclaration_ModuleType,
edkModuleDeclaration_RefersTo,
edkNormalMethod_HasParameters,
edkNormalMethod_HasBody,
edkNormalMethod_HasThrownExceptions,
edkPackage_HasCompilationUnits,
edkPackage_IsInModule,
edkPackageDeclaration_HasPackageName,
edkPackageDeclaration_RefersTo,
edkScope_HasMembers,
edkTypeDeclaration_HasSuperClass,
edkTypeDeclaration_HasSuperInterfaces,
edkTypeDeclaration_HasOthers,
edkTypeDeclaration_IsInCompilationUnit,
edkTypeDeclaration_IsInModule,
edkTypeParameter_HasBounds,
edkVariable_HasInitialValue,
edkVariableDeclaration_HasType,
edkArrayType_ComponentType,
edkClassType_RefersTo,
edkIntersectionType_Bounds,
edkMethodType_ReturnType,
edkMethodType_ParameterTypes,
edkMethodType_ThrownTypes,
edkModuleType_RefersTo,
edkPackageType_RefersTo,
edkParameterizedType_RawType,
edkParameterizedType_ArgumentTypes,
edkScopedType_Owner,
edkTypeVariable_RefersTo,
edkUnionType_Alternatives,
edkWildcardType_Bound;
}
| 4,887 | 29.55 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/PrefixOperatorKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum PrefixOperatorKind {
peokIncrement,
peokDecrement,
peokPlus,
peokMinus,
peokComplement,
peokNot;
}
| 884 | 25.818182 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/MemberReferenceKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum MemberReferenceKind {
mrkSuper,
mrkUnbound,
mrkStatic,
mrkBound,
mrkImplicitInner,
mrkToplevel,
mrkArrayCtor;
}
| 898 | 25.441176 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/TypeBoundKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum TypeBoundKind {
tbkWildcard,
tbkExtends,
tbkSuper;
}
| 835 | 26.866667 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/InfixOperatorKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum InfixOperatorKind {
iokPlus,
iokMinus,
iokTimes,
iokDivide,
iokRemainder,
iokLeftShift,
iokSignedRightShift,
iokUnsignedRightShift,
iokBitwiseAndLogicalAnd,
iokBitwiseAndLogicalOr,
iokBitwiseAndLogicalXor,
iokLessThan,
iokGreaterThan,
iokLessThanOrEqualTo,
iokGreaterThanOrEqualTo,
iokEqualTo,
iokNotEqualTo,
iokConditionalAnd,
iokConditionalOr;
}
| 1,146 | 23.934783 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/AccessibilityKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum AccessibilityKind {
ackNone,
ackPublic,
ackProtected,
ackPrivate;
}
| 851 | 26.483871 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/NodeKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum NodeKind {
ndkBase,
ndkBlockComment,
ndkComment,
ndkCommentable,
ndkJavadocComment,
ndkLineComment,
ndkNamed,
ndkNonJavadocComment,
ndkPositioned,
ndkPositionedWithoutComment,
ndkAnnotatedTypeExpression,
ndkAnnotation,
ndkArrayAccess,
ndkArrayTypeExpression,
ndkAssignment,
ndkBinary,
ndkBooleanLiteral,
ndkCharacterLiteral,
ndkClassLiteral,
ndkConditional,
ndkDoubleLiteral,
ndkErroneous,
ndkErroneousTypeExpression,
ndkExpression,
ndkExternalTypeExpression,
ndkFieldAccess,
ndkFloatLiteral,
ndkFunctionalExpression,
ndkIdentifier,
ndkInfixExpression,
ndkInstanceOf,
ndkIntegerLiteral,
ndkLambda,
ndkLiteral,
ndkLongLiteral,
ndkMarkerAnnotation,
ndkMemberReference,
ndkMethodInvocation,
ndkNewArray,
ndkNewClass,
ndkNormalAnnotation,
ndkNullLiteral,
ndkNumberLiteral,
ndkParenthesizedExpression,
ndkPolyExpression,
ndkPostfixExpression,
ndkPrefixExpression,
ndkPrimitiveTypeExpression,
ndkQualifiedTypeExpression,
ndkSimpleTypeExpression,
ndkSingleElementAnnotation,
ndkStringLiteral,
ndkSuper,
ndkThis,
ndkTypeApplyExpression,
ndkTypeCast,
ndkTypeExpression,
ndkTypeIntersectionExpression,
ndkTypeUnionExpression,
ndkUnary,
ndkWildcardExpression,
ndkExports,
ndkModuleDirective,
ndkOpens,
ndkProvides,
ndkRequires,
ndkUses,
ndkAssert,
ndkBasicFor,
ndkBlock,
ndkBreak,
ndkCase,
ndkContinue,
ndkDefault,
ndkDo,
ndkEmpty,
ndkEnhancedFor,
ndkExpressionStatement,
ndkFor,
ndkHandler,
ndkIf,
ndkIteration,
ndkJump,
ndkLabeledStatement,
ndkReturn,
ndkSelection,
ndkStatement,
ndkSwitch,
ndkSwitchLabel,
ndkSynchronized,
ndkThrow,
ndkTry,
ndkWhile,
ndkAnnotatedElement,
ndkAnnotationType,
ndkAnnotationTypeElement,
ndkAnonymousClass,
ndkClass,
ndkClassDeclaration,
ndkClassGeneric,
ndkCompilationUnit,
ndkDeclaration,
ndkEnum,
ndkEnumConstant,
ndkGenericDeclaration,
ndkImport,
ndkInitializerBlock,
ndkInstanceInitializerBlock,
ndkInterface,
ndkInterfaceDeclaration,
ndkInterfaceGeneric,
ndkMember,
ndkMethod,
ndkMethodDeclaration,
ndkMethodGeneric,
ndkModule,
ndkModuleDeclaration,
ndkNamedDeclaration,
ndkNormalMethod,
ndkPackage,
ndkPackageDeclaration,
ndkParameter,
ndkScope,
ndkStaticInitializerBlock,
ndkTypeDeclaration,
ndkTypeParameter,
ndkVariable,
ndkVariableDeclaration,
ndkArrayType,
ndkBooleanType,
ndkBoundedWildcardType,
ndkByteType,
ndkCharType,
ndkClassType,
ndkDoubleType,
ndkErrorType,
ndkFloatType,
ndkIntType,
ndkIntersectionType,
ndkLongType,
ndkLowerBoundedWildcardType,
ndkMethodType,
ndkModuleType,
ndkNoType,
ndkNullType,
ndkPackageType,
ndkParameterizedType,
ndkPrimitiveType,
ndkScopedType,
ndkShortType,
ndkType,
ndkTypeVariable,
ndkUnboundedWildcardType,
ndkUnionType,
ndkUpperBoundedWildcardType,
ndkVoidType,
ndkWildcardType;
}
| 3,590 | 18.516304 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/enums/PrimitiveTypeKind.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.enums;
public enum PrimitiveTypeKind {
ptkVoid,
ptkBoolean,
ptkChar,
ptkByte,
ptkShort,
ptkInt,
ptkLong,
ptkFloat,
ptkDouble;
}
| 897 | 23.944444 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/algorithms/Algorithm.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.algorithms;
import columbus.java.asg.visitors.Visitor;
/**
* Common base class for all algorithm classes.
*/
public abstract class Algorithm {
/**
* Increases the depth of the given visitor.
* @param v The visitor class.
*/
public void incVisitorDepth(Visitor v) {
v.incDepth();
}
/**
* Decreases the depth of the given visitor.
* @param v The visitor class.
*/
public void decVisitorDepth(Visitor v) {
v.decDepth();
}
}
| 1,207 | 24.702128 | 85 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/algorithms/AlgorithmPreorder.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.algorithms;
import columbus.java.asg.*;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.BlockComment;
import columbus.java.asg.base.Comment;
import columbus.java.asg.base.Commentable;
import columbus.java.asg.base.JavadocComment;
import columbus.java.asg.base.LineComment;
import columbus.java.asg.base.Named;
import columbus.java.asg.base.NonJavadocComment;
import columbus.java.asg.base.Positioned;
import columbus.java.asg.base.PositionedWithoutComment;
import columbus.java.asg.expr.AnnotatedTypeExpression;
import columbus.java.asg.expr.Annotation;
import columbus.java.asg.expr.ArrayAccess;
import columbus.java.asg.expr.ArrayTypeExpression;
import columbus.java.asg.expr.Assignment;
import columbus.java.asg.expr.Binary;
import columbus.java.asg.expr.BooleanLiteral;
import columbus.java.asg.expr.CharacterLiteral;
import columbus.java.asg.expr.ClassLiteral;
import columbus.java.asg.expr.Conditional;
import columbus.java.asg.expr.DoubleLiteral;
import columbus.java.asg.expr.Erroneous;
import columbus.java.asg.expr.ErroneousTypeExpression;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.expr.ExternalTypeExpression;
import columbus.java.asg.expr.FieldAccess;
import columbus.java.asg.expr.FloatLiteral;
import columbus.java.asg.expr.FunctionalExpression;
import columbus.java.asg.expr.Identifier;
import columbus.java.asg.expr.InfixExpression;
import columbus.java.asg.expr.InstanceOf;
import columbus.java.asg.expr.IntegerLiteral;
import columbus.java.asg.expr.Lambda;
import columbus.java.asg.expr.Literal;
import columbus.java.asg.expr.LongLiteral;
import columbus.java.asg.expr.MarkerAnnotation;
import columbus.java.asg.expr.MemberReference;
import columbus.java.asg.expr.MethodInvocation;
import columbus.java.asg.expr.NewArray;
import columbus.java.asg.expr.NewClass;
import columbus.java.asg.expr.NormalAnnotation;
import columbus.java.asg.expr.NullLiteral;
import columbus.java.asg.expr.NumberLiteral;
import columbus.java.asg.expr.ParenthesizedExpression;
import columbus.java.asg.expr.PolyExpression;
import columbus.java.asg.expr.PostfixExpression;
import columbus.java.asg.expr.PrefixExpression;
import columbus.java.asg.expr.PrimitiveTypeExpression;
import columbus.java.asg.expr.QualifiedTypeExpression;
import columbus.java.asg.expr.SimpleTypeExpression;
import columbus.java.asg.expr.SingleElementAnnotation;
import columbus.java.asg.expr.StringLiteral;
import columbus.java.asg.expr.Super;
import columbus.java.asg.expr.This;
import columbus.java.asg.expr.TypeApplyExpression;
import columbus.java.asg.expr.TypeCast;
import columbus.java.asg.expr.TypeExpression;
import columbus.java.asg.expr.TypeIntersectionExpression;
import columbus.java.asg.expr.TypeUnionExpression;
import columbus.java.asg.expr.Unary;
import columbus.java.asg.expr.WildcardExpression;
import columbus.java.asg.module.Exports;
import columbus.java.asg.module.ModuleDirective;
import columbus.java.asg.module.Opens;
import columbus.java.asg.module.Provides;
import columbus.java.asg.module.Requires;
import columbus.java.asg.module.Uses;
import columbus.java.asg.statm.Assert;
import columbus.java.asg.statm.BasicFor;
import columbus.java.asg.statm.Block;
import columbus.java.asg.statm.Break;
import columbus.java.asg.statm.Case;
import columbus.java.asg.statm.Continue;
import columbus.java.asg.statm.Default;
import columbus.java.asg.statm.Do;
import columbus.java.asg.statm.Empty;
import columbus.java.asg.statm.EnhancedFor;
import columbus.java.asg.statm.ExpressionStatement;
import columbus.java.asg.statm.For;
import columbus.java.asg.statm.Handler;
import columbus.java.asg.statm.If;
import columbus.java.asg.statm.Iteration;
import columbus.java.asg.statm.Jump;
import columbus.java.asg.statm.LabeledStatement;
import columbus.java.asg.statm.Return;
import columbus.java.asg.statm.Selection;
import columbus.java.asg.statm.Statement;
import columbus.java.asg.statm.Switch;
import columbus.java.asg.statm.SwitchLabel;
import columbus.java.asg.statm.Synchronized;
import columbus.java.asg.statm.Throw;
import columbus.java.asg.statm.Try;
import columbus.java.asg.statm.While;
import columbus.java.asg.struc.AnnotatedElement;
import columbus.java.asg.struc.AnnotationType;
import columbus.java.asg.struc.AnnotationTypeElement;
import columbus.java.asg.struc.AnonymousClass;
import columbus.java.asg.struc.Class;
import columbus.java.asg.struc.ClassDeclaration;
import columbus.java.asg.struc.ClassGeneric;
import columbus.java.asg.struc.CompilationUnit;
import columbus.java.asg.struc.Declaration;
import columbus.java.asg.struc.Enum;
import columbus.java.asg.struc.EnumConstant;
import columbus.java.asg.struc.GenericDeclaration;
import columbus.java.asg.struc.Import;
import columbus.java.asg.struc.InitializerBlock;
import columbus.java.asg.struc.InstanceInitializerBlock;
import columbus.java.asg.struc.Interface;
import columbus.java.asg.struc.InterfaceDeclaration;
import columbus.java.asg.struc.InterfaceGeneric;
import columbus.java.asg.struc.Member;
import columbus.java.asg.struc.Method;
import columbus.java.asg.struc.MethodDeclaration;
import columbus.java.asg.struc.MethodGeneric;
import columbus.java.asg.struc.Module;
import columbus.java.asg.struc.ModuleDeclaration;
import columbus.java.asg.struc.NamedDeclaration;
import columbus.java.asg.struc.NormalMethod;
import columbus.java.asg.struc.Package;
import columbus.java.asg.struc.PackageDeclaration;
import columbus.java.asg.struc.Parameter;
import columbus.java.asg.struc.Scope;
import columbus.java.asg.struc.StaticInitializerBlock;
import columbus.java.asg.struc.TypeDeclaration;
import columbus.java.asg.struc.TypeParameter;
import columbus.java.asg.struc.Variable;
import columbus.java.asg.struc.VariableDeclaration;
import columbus.java.asg.type.ArrayType;
import columbus.java.asg.type.BooleanType;
import columbus.java.asg.type.BoundedWildcardType;
import columbus.java.asg.type.ByteType;
import columbus.java.asg.type.CharType;
import columbus.java.asg.type.ClassType;
import columbus.java.asg.type.DoubleType;
import columbus.java.asg.type.ErrorType;
import columbus.java.asg.type.FloatType;
import columbus.java.asg.type.IntType;
import columbus.java.asg.type.IntersectionType;
import columbus.java.asg.type.LongType;
import columbus.java.asg.type.LowerBoundedWildcardType;
import columbus.java.asg.type.MethodType;
import columbus.java.asg.type.ModuleType;
import columbus.java.asg.type.NoType;
import columbus.java.asg.type.NullType;
import columbus.java.asg.type.PackageType;
import columbus.java.asg.type.ParameterizedType;
import columbus.java.asg.type.PrimitiveType;
import columbus.java.asg.type.ScopedType;
import columbus.java.asg.type.ShortType;
import columbus.java.asg.type.Type;
import columbus.java.asg.type.TypeVariable;
import columbus.java.asg.type.UnboundedWildcardType;
import columbus.java.asg.type.UnionType;
import columbus.java.asg.type.UpperBoundedWildcardType;
import columbus.java.asg.type.VoidType;
import columbus.java.asg.type.WildcardType;
import columbus.java.asg.visitors.Visitor;
/**
* Implements the preorder traversal.
*/
public class AlgorithmPreorder extends Algorithm {
/** Reference to the Factory. */
protected Factory fact;
/** Reference to the Visitor. */
protected Visitor visitor;
/** Only a subgraph of a given node or each node will be traversed. */
protected boolean apRoot = false;
/** If it is true, each node is visited only once during preorder. */
protected boolean safeMode = false;
/** Stores the nodes that are already visited during the actual run. */
protected boolean[] visitedNodes;
/** Stores the nodes that are not yet visited during the actual run. */
protected boolean[] unvisitedNodes;
/** Determines whether special nodes will be visited or not. */
protected boolean visitSpecialNodes = true;
/** Determines whether only used special nodes will be visited or all of them. */
protected boolean visitUsedSpecialNodesOnly = false;
/**
* Constructor.
*/
public AlgorithmPreorder() {
}
/**
* Sets that a node will be visited only once in the visiting.
*/
public void setSafeMode() {
safeMode = true;
}
/**
* Sets that the preorder is executed duly the graph (which means that a node can be visited more than once, even if there is a circle in the graph it will be an endless visiting).
*/
public void setUnsafeMode() {
safeMode = false;
}
/**
* Sets whether special nodes (or only used of them) are visited or not.
* @param visit If visit parameter is true, special nodes are visited as well, otherwise they are not visited.
* @param usedOnly If usedOnly parameter is true, only those special nodes are visited that were 'used' during preorder.
*/
public void setVisitSpecialNodes(boolean visit, boolean usedOnly) {
visitSpecialNodes = visit;
visitUsedSpecialNodesOnly = visit && usedOnly;
}
/**
* Starts a preorder traversal which visits all nodes of the parameter `fact', then recursively processing all subtrees, and at every nodes call the appropriate visit function of the Visitor `visitor'
* @param fact The factory.
* @param visitor The visitor which is called to visit the given node or edge.
*/
public void run(Factory fact, Visitor visitor) {
mainRun(fact, visitor, null);
}
/**
* Starts a preorder traversal which visits all nodes of the parameter `fact' by processing the node with the given id, then recursively processing all subtrees, and at every nodes call the appropriate visit function of the Visitor `visitor'
* @param fact The factory.
* @param visitor The visitor which is called to visit the given node or edge.
* @param nodeId The preorder visits only the subtree of this node.
*/
public void run(Factory fact, Visitor visitor, int nodeId) {
mainRun(fact, visitor, fact.getRef(nodeId));
}
/**
* Starts a preorder traversal which visits all nodes of the parameter `fact' by processing the parameter `node', then recursively processing all subtrees, and at every nodes call the appropriate visit function of the Visitor `visitor'
* @param fact The factory.
* @param visitor The visitor which is called to visit the given node or edge.
* @param node The preorder visits only the subtree of this node.
*/
public void run(Factory fact, Visitor visitor, Base node) {
mainRun(fact, visitor, node);
}
/**
* Main entry point of the traversal.
*/
protected void mainRun(Factory fact, Visitor visitor, Base node) {
this.fact = fact;
this.visitor = visitor;
this.apRoot = (node != null);
if (safeMode || visitSpecialNodes) {
visitedNodes = new boolean[fact.size()];
}
if (visitSpecialNodes) {
unvisitedNodes = new boolean[fact.size()];
}
visitor.beginVisit();
if (!apRoot) { // traverse all nodes which have no parent
Factory.Iterator factIt = fact.iterator();
while (factIt.hasNext()) {
Base b = factIt.next();
if (b.getParent() == null) {
recRun(b);
}
}
} else { // traverse this node only
recRun(node);
if (visitSpecialNodes && !visitUsedSpecialNodesOnly) {
Factory.Iterator factIt = fact.iterator();
while (factIt.hasNext()) {
Base b = factIt.next();
if (!visitedNodes[b.getId()] && Common.getIsAPSpecNode(b)) {
recRun(b);
}
}
}
if (visitUsedSpecialNodesOnly) {
boolean wasNodeToTraversal = false;
int factSize = fact.size();
do {
wasNodeToTraversal = false;
for (int i = 0; i < factSize; ++i) {
if (unvisitedNodes[i] && !visitedNodes[i]) {
recRun(fact.getRef(i));
wasNodeToTraversal = true;
unvisitedNodes[i] = false;
}
}
} while (wasNodeToTraversal);
}
}
visitor.finishVisit();
}
/**
* Traverse the given node and its subtree recursively.
*/
protected void recRun(Base node) {
if (safeMode || visitSpecialNodes) {
if (safeMode) {
if (visitedNodes[node.getId()]) // for safemode
return;
}
visitedNodes[node.getId()] = true;
}
node.accept(visitor);
incVisitorDepth(visitor);
switch (node.getNodeKind()) {
// ndkBase is abstract
case ndkBlockComment: // ndkBlockComment is visited at the end
traverse((BlockComment)node, true);
break;
// ndkComment is abstract
// ndkCommentable is abstract
case ndkJavadocComment: // ndkJavadocComment is visited at the end
traverse((JavadocComment)node, true);
break;
case ndkLineComment: // ndkLineComment is visited at the end
traverse((LineComment)node, true);
break;
// ndkNamed is abstract
// ndkNonJavadocComment is abstract
// ndkPositioned is abstract
// ndkPositionedWithoutComment is abstract
case ndkAnnotatedTypeExpression:
traverse((AnnotatedTypeExpression)node, true);
break;
// ndkAnnotation is abstract
case ndkArrayAccess:
traverse((ArrayAccess)node, true);
break;
case ndkArrayTypeExpression:
traverse((ArrayTypeExpression)node, true);
break;
case ndkAssignment:
traverse((Assignment)node, true);
break;
// ndkBinary is abstract
case ndkBooleanLiteral:
traverse((BooleanLiteral)node, true);
break;
case ndkCharacterLiteral:
traverse((CharacterLiteral)node, true);
break;
case ndkClassLiteral:
traverse((ClassLiteral)node, true);
break;
case ndkConditional:
traverse((Conditional)node, true);
break;
case ndkDoubleLiteral:
traverse((DoubleLiteral)node, true);
break;
case ndkErroneous:
traverse((Erroneous)node, true);
break;
case ndkErroneousTypeExpression:
traverse((ErroneousTypeExpression)node, true);
break;
// ndkExpression is abstract
case ndkExternalTypeExpression:
traverse((ExternalTypeExpression)node, true);
break;
case ndkFieldAccess:
traverse((FieldAccess)node, true);
break;
case ndkFloatLiteral:
traverse((FloatLiteral)node, true);
break;
// ndkFunctionalExpression is abstract
case ndkIdentifier:
traverse((Identifier)node, true);
break;
case ndkInfixExpression:
traverse((InfixExpression)node, true);
break;
case ndkInstanceOf:
traverse((InstanceOf)node, true);
break;
case ndkIntegerLiteral:
traverse((IntegerLiteral)node, true);
break;
case ndkLambda:
traverse((Lambda)node, true);
break;
// ndkLiteral is abstract
case ndkLongLiteral:
traverse((LongLiteral)node, true);
break;
case ndkMarkerAnnotation:
traverse((MarkerAnnotation)node, true);
break;
case ndkMemberReference:
traverse((MemberReference)node, true);
break;
case ndkMethodInvocation:
traverse((MethodInvocation)node, true);
break;
case ndkNewArray:
traverse((NewArray)node, true);
break;
case ndkNewClass:
traverse((NewClass)node, true);
break;
case ndkNormalAnnotation:
traverse((NormalAnnotation)node, true);
break;
case ndkNullLiteral:
traverse((NullLiteral)node, true);
break;
// ndkNumberLiteral is abstract
case ndkParenthesizedExpression:
traverse((ParenthesizedExpression)node, true);
break;
// ndkPolyExpression is abstract
case ndkPostfixExpression:
traverse((PostfixExpression)node, true);
break;
case ndkPrefixExpression:
traverse((PrefixExpression)node, true);
break;
case ndkPrimitiveTypeExpression:
traverse((PrimitiveTypeExpression)node, true);
break;
case ndkQualifiedTypeExpression:
traverse((QualifiedTypeExpression)node, true);
break;
case ndkSimpleTypeExpression:
traverse((SimpleTypeExpression)node, true);
break;
case ndkSingleElementAnnotation:
traverse((SingleElementAnnotation)node, true);
break;
case ndkStringLiteral:
traverse((StringLiteral)node, true);
break;
case ndkSuper:
traverse((Super)node, true);
break;
case ndkThis:
traverse((This)node, true);
break;
case ndkTypeApplyExpression:
traverse((TypeApplyExpression)node, true);
break;
case ndkTypeCast:
traverse((TypeCast)node, true);
break;
// ndkTypeExpression is abstract
case ndkTypeIntersectionExpression:
traverse((TypeIntersectionExpression)node, true);
break;
case ndkTypeUnionExpression:
traverse((TypeUnionExpression)node, true);
break;
// ndkUnary is abstract
case ndkWildcardExpression:
traverse((WildcardExpression)node, true);
break;
case ndkExports:
traverse((Exports)node, true);
break;
// ndkModuleDirective is abstract
case ndkOpens:
traverse((Opens)node, true);
break;
case ndkProvides:
traverse((Provides)node, true);
break;
case ndkRequires:
traverse((Requires)node, true);
break;
case ndkUses:
traverse((Uses)node, true);
break;
case ndkAssert:
traverse((Assert)node, true);
break;
case ndkBasicFor:
traverse((BasicFor)node, true);
break;
case ndkBlock:
traverse((Block)node, true);
break;
case ndkBreak:
traverse((Break)node, true);
break;
case ndkCase:
traverse((Case)node, true);
break;
case ndkContinue:
traverse((Continue)node, true);
break;
case ndkDefault:
traverse((Default)node, true);
break;
case ndkDo:
traverse((Do)node, true);
break;
case ndkEmpty:
traverse((Empty)node, true);
break;
case ndkEnhancedFor:
traverse((EnhancedFor)node, true);
break;
case ndkExpressionStatement:
traverse((ExpressionStatement)node, true);
break;
// ndkFor is abstract
case ndkHandler:
traverse((Handler)node, true);
break;
case ndkIf:
traverse((If)node, true);
break;
// ndkIteration is abstract
// ndkJump is abstract
case ndkLabeledStatement:
traverse((LabeledStatement)node, true);
break;
case ndkReturn:
traverse((Return)node, true);
break;
// ndkSelection is abstract
// ndkStatement is abstract
case ndkSwitch:
traverse((Switch)node, true);
break;
// ndkSwitchLabel is abstract
case ndkSynchronized:
traverse((Synchronized)node, true);
break;
case ndkThrow:
traverse((Throw)node, true);
break;
case ndkTry:
traverse((Try)node, true);
break;
case ndkWhile:
traverse((While)node, true);
break;
// ndkAnnotatedElement is abstract
case ndkAnnotationType:
traverse((AnnotationType)node, true);
break;
case ndkAnnotationTypeElement:
traverse((AnnotationTypeElement)node, true);
break;
case ndkAnonymousClass:
traverse((AnonymousClass)node, true);
break;
case ndkClass:
traverse((Class)node, true);
break;
// ndkClassDeclaration is abstract
case ndkClassGeneric:
traverse((ClassGeneric)node, true);
break;
case ndkCompilationUnit:
traverse((CompilationUnit)node, true);
break;
// ndkDeclaration is abstract
case ndkEnum:
traverse((Enum)node, true);
break;
case ndkEnumConstant:
traverse((EnumConstant)node, true);
break;
// ndkGenericDeclaration is abstract
case ndkImport:
traverse((Import)node, true);
break;
// ndkInitializerBlock is abstract
case ndkInstanceInitializerBlock:
traverse((InstanceInitializerBlock)node, true);
break;
case ndkInterface:
traverse((Interface)node, true);
break;
// ndkInterfaceDeclaration is abstract
case ndkInterfaceGeneric:
traverse((InterfaceGeneric)node, true);
break;
// ndkMember is abstract
case ndkMethod:
traverse((Method)node, true);
break;
// ndkMethodDeclaration is abstract
case ndkMethodGeneric:
traverse((MethodGeneric)node, true);
break;
case ndkModule:
traverse((Module)node, true);
break;
case ndkModuleDeclaration:
traverse((ModuleDeclaration)node, true);
break;
// ndkNamedDeclaration is abstract
// ndkNormalMethod is abstract
case ndkPackage:
traverse((Package)node, true);
break;
case ndkPackageDeclaration:
traverse((PackageDeclaration)node, true);
break;
case ndkParameter:
traverse((Parameter)node, true);
break;
// ndkScope is abstract
case ndkStaticInitializerBlock:
traverse((StaticInitializerBlock)node, true);
break;
// ndkTypeDeclaration is abstract
case ndkTypeParameter:
traverse((TypeParameter)node, true);
break;
case ndkVariable:
traverse((Variable)node, true);
break;
// ndkVariableDeclaration is abstract
case ndkArrayType: // ndkArrayType is visited at the end
traverse((ArrayType)node, true);
break;
case ndkBooleanType: // ndkBooleanType is visited at the end
traverse((BooleanType)node, true);
break;
// ndkBoundedWildcardType is abstract
case ndkByteType: // ndkByteType is visited at the end
traverse((ByteType)node, true);
break;
case ndkCharType: // ndkCharType is visited at the end
traverse((CharType)node, true);
break;
case ndkClassType: // ndkClassType is visited at the end
traverse((ClassType)node, true);
break;
case ndkDoubleType: // ndkDoubleType is visited at the end
traverse((DoubleType)node, true);
break;
case ndkErrorType: // ndkErrorType is visited at the end
traverse((ErrorType)node, true);
break;
case ndkFloatType: // ndkFloatType is visited at the end
traverse((FloatType)node, true);
break;
case ndkIntType: // ndkIntType is visited at the end
traverse((IntType)node, true);
break;
case ndkIntersectionType:
traverse((IntersectionType)node, true);
break;
case ndkLongType: // ndkLongType is visited at the end
traverse((LongType)node, true);
break;
case ndkLowerBoundedWildcardType: // ndkLowerBoundedWildcardType is visited at the end
traverse((LowerBoundedWildcardType)node, true);
break;
case ndkMethodType: // ndkMethodType is visited at the end
traverse((MethodType)node, true);
break;
case ndkModuleType:
traverse((ModuleType)node, true);
break;
case ndkNoType: // ndkNoType is visited at the end
traverse((NoType)node, true);
break;
case ndkNullType: // ndkNullType is visited at the end
traverse((NullType)node, true);
break;
case ndkPackageType: // ndkPackageType is visited at the end
traverse((PackageType)node, true);
break;
case ndkParameterizedType: // ndkParameterizedType is visited at the end
traverse((ParameterizedType)node, true);
break;
// ndkPrimitiveType is abstract
// ndkScopedType is abstract
case ndkShortType: // ndkShortType is visited at the end
traverse((ShortType)node, true);
break;
// ndkType is abstract
case ndkTypeVariable: // ndkTypeVariable is visited at the end
traverse((TypeVariable)node, true);
break;
case ndkUnboundedWildcardType: // ndkUnboundedWildcardType is visited at the end
traverse((UnboundedWildcardType)node, true);
break;
case ndkUnionType: // ndkUnionType is visited at the end
traverse((UnionType)node, true);
break;
case ndkUpperBoundedWildcardType: // ndkUpperBoundedWildcardType is visited at the end
traverse((UpperBoundedWildcardType)node, true);
break;
case ndkVoidType: // ndkVoidType is visited at the end
traverse((VoidType)node, true);
break;
// ndkWildcardType is abstract
default:
break;
} // switch
decVisitorDepth(visitor);
node.acceptEnd(visitor);
} // recRun
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Base node, boolean callVirtualBase) {
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(BlockComment node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
traverse((NonJavadocComment)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Comment node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
traverse((PositionedWithoutComment)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Commentable node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
// edge: comments
for (EdgeIterator<Comment> it = node.getCommentsIterator(); it.hasNext(); ) {
Comment end = it.next();
visitor.visitCommentable_Comments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndCommentable_Comments(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(JavadocComment node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
traverse((Comment)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(LineComment node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
traverse((NonJavadocComment)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Named node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NonJavadocComment node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
traverse((Comment)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Positioned node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((PositionedWithoutComment)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PositionedWithoutComment node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(AnnotatedTypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
Base genNodeRef;
// edge: hasAnnotations
for (EdgeIterator<Annotation> it = node.getAnnotationsIterator(); it.hasNext(); ) {
Annotation end = it.next();
visitor.visitAnnotatedTypeExpression_HasAnnotations(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndAnnotatedTypeExpression_HasAnnotations(node, end);
}
// edge: hasUnderlyingType
genNodeRef = node.getUnderlyingType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitAnnotatedTypeExpression_HasUnderlyingType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndAnnotatedTypeExpression_HasUnderlyingType(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Annotation node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
Base genNodeRef;
// edge: hasAnnotationName
genNodeRef = node.getAnnotationName();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitAnnotation_HasAnnotationName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndAnnotation_HasAnnotationName(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ArrayAccess node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Binary)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ArrayTypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
Base genNodeRef;
// edge: hasComponentType
genNodeRef = node.getComponentType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitArrayTypeExpression_HasComponentType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndArrayTypeExpression_HasComponentType(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Assignment node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Binary)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Binary node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
Base genNodeRef;
// edge: hasLeftOperand
genNodeRef = node.getLeftOperand();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitBinary_HasLeftOperand(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndBinary_HasLeftOperand(node, end);
}
// edge: hasRightOperand
genNodeRef = node.getRightOperand();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitBinary_HasRightOperand(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndBinary_HasRightOperand(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(BooleanLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Literal)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(CharacterLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Literal)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ClassLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Literal)node, false);
Base genNodeRef;
// edge: hasComponentType
genNodeRef = node.getComponentType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitClassLiteral_HasComponentType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndClassLiteral_HasComponentType(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Conditional node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
Base genNodeRef;
// edge: hasCondition
genNodeRef = node.getCondition();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitConditional_HasCondition(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndConditional_HasCondition(node, end);
}
// edge: hasTrueExpression
genNodeRef = node.getTrueExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitConditional_HasTrueExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndConditional_HasTrueExpression(node, end);
}
// edge: hasFalseExpression
genNodeRef = node.getFalseExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitConditional_HasFalseExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndConditional_HasFalseExpression(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(DoubleLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((NumberLiteral)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Erroneous node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
// edge: hasErrors
for (EdgeIterator<Positioned> it = node.getErrorsIterator(); it.hasNext(); ) {
Positioned end = it.next();
visitor.visitErroneous_HasErrors(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndErroneous_HasErrors(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ErroneousTypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
// edge: hasErrors
for (EdgeIterator<Positioned> it = node.getErrorsIterator(); it.hasNext(); ) {
Positioned end = it.next();
visitor.visitErroneousTypeExpression_HasErrors(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndErroneousTypeExpression_HasErrors(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Expression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
Base genNodeRef;
// edge: type
genNodeRef = node.getType();
if (genNodeRef != null) {
Type end = (Type)genNodeRef;
visitor.visitExpression_Type(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndExpression_Type(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ExternalTypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(FieldAccess node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Binary)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(FloatLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((NumberLiteral)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(FunctionalExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((PolyExpression)node, false);
Base genNodeRef;
// edge: target
genNodeRef = node.getTarget();
if (genNodeRef != null) {
Type end = (Type)genNodeRef;
visitor.visitFunctionalExpression_Target(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndFunctionalExpression_Target(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Identifier node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
Base genNodeRef;
// edge: refersTo
genNodeRef = node.getRefersTo();
if (genNodeRef != null) {
Named end = (Named)genNodeRef;
visitor.visitIdentifier_RefersTo(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndIdentifier_RefersTo(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(InfixExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Binary)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(InstanceOf node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Unary)node, false);
Base genNodeRef;
// edge: hasTypeOperand
genNodeRef = node.getTypeOperand();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitInstanceOf_HasTypeOperand(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndInstanceOf_HasTypeOperand(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(IntegerLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((NumberLiteral)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Lambda node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((FunctionalExpression)node, false);
Base genNodeRef;
// edge: hasParameters
for (EdgeIterator<Parameter> it = node.getParametersIterator(); it.hasNext(); ) {
Parameter end = it.next();
visitor.visitLambda_HasParameters(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndLambda_HasParameters(node, end);
}
// edge: hasBody
genNodeRef = node.getBody();
if (genNodeRef != null) {
Positioned end = (Positioned)genNodeRef;
visitor.visitLambda_HasBody(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndLambda_HasBody(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Literal node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(LongLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((NumberLiteral)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(MarkerAnnotation node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Annotation)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(MemberReference node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((FunctionalExpression)node, false);
Base genNodeRef;
// edge: hasQualifierExpression
genNodeRef = node.getQualifierExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitMemberReference_HasQualifierExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndMemberReference_HasQualifierExpression(node, end);
}
// edge: hasTypeArguments
for (EdgeIterator<TypeExpression> it = node.getTypeArgumentsIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitMemberReference_HasTypeArguments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndMemberReference_HasTypeArguments(node, end);
}
// edge: referredMethod
genNodeRef = node.getReferredMethod();
if (genNodeRef != null) {
MethodDeclaration end = (MethodDeclaration)genNodeRef;
visitor.visitMemberReference_ReferredMethod(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndMemberReference_ReferredMethod(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(MethodInvocation node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Unary)node, false);
Base genNodeRef;
// edge: hasTypeArguments
for (EdgeIterator<TypeExpression> it = node.getTypeArgumentsIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitMethodInvocation_HasTypeArguments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndMethodInvocation_HasTypeArguments(node, end);
}
// edge: hasArguments
for (EdgeIterator<Expression> it = node.getArgumentsIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitMethodInvocation_HasArguments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndMethodInvocation_HasArguments(node, end);
}
// edge: invokes
genNodeRef = node.getInvokes();
if (genNodeRef != null) {
MethodDeclaration end = (MethodDeclaration)genNodeRef;
visitor.visitMethodInvocation_Invokes(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndMethodInvocation_Invokes(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NewArray node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
Base genNodeRef;
// edge: hasComponentType
genNodeRef = node.getComponentType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitNewArray_HasComponentType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewArray_HasComponentType(node, end);
}
// edge: hasDimensions
for (EdgeIterator<Expression> it = node.getDimensionsIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitNewArray_HasDimensions(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewArray_HasDimensions(node, end);
}
// edge: hasInitializers
for (EdgeIterator<Expression> it = node.getInitializersIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitNewArray_HasInitializers(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewArray_HasInitializers(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NewClass node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
Base genNodeRef;
// edge: hasEnclosingExpression
genNodeRef = node.getEnclosingExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitNewClass_HasEnclosingExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewClass_HasEnclosingExpression(node, end);
}
// edge: hasTypeArguments
for (EdgeIterator<TypeExpression> it = node.getTypeArgumentsIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitNewClass_HasTypeArguments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewClass_HasTypeArguments(node, end);
}
// edge: hasTypeName
genNodeRef = node.getTypeName();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitNewClass_HasTypeName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewClass_HasTypeName(node, end);
}
// edge: hasArguments
for (EdgeIterator<Expression> it = node.getArgumentsIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitNewClass_HasArguments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewClass_HasArguments(node, end);
}
// edge: hasAnonymousClass
genNodeRef = node.getAnonymousClass();
if (genNodeRef != null) {
AnonymousClass end = (AnonymousClass)genNodeRef;
visitor.visitNewClass_HasAnonymousClass(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNewClass_HasAnonymousClass(node, end);
}
// edge: constructor
genNodeRef = node.getConstructor();
if (genNodeRef != null) {
NormalMethod end = (NormalMethod)genNodeRef;
visitor.visitNewClass_Constructor(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndNewClass_Constructor(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NormalAnnotation node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Annotation)node, false);
// edge: hasArguments
for (EdgeIterator<Expression> it = node.getArgumentsIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitNormalAnnotation_HasArguments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNormalAnnotation_HasArguments(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NullLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Literal)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NumberLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Literal)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ParenthesizedExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Unary)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PolyExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PostfixExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Unary)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PrefixExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Unary)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PrimitiveTypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(QualifiedTypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
Base genNodeRef;
// edge: hasQualifierType
genNodeRef = node.getQualifierType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitQualifiedTypeExpression_HasQualifierType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndQualifiedTypeExpression_HasQualifierType(node, end);
}
// edge: hasSimpleType
genNodeRef = node.getSimpleType();
if (genNodeRef != null) {
SimpleTypeExpression end = (SimpleTypeExpression)genNodeRef;
visitor.visitQualifiedTypeExpression_HasSimpleType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndQualifiedTypeExpression_HasSimpleType(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(SimpleTypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(SingleElementAnnotation node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Annotation)node, false);
Base genNodeRef;
// edge: hasArgument
genNodeRef = node.getArgument();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitSingleElementAnnotation_HasArgument(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndSingleElementAnnotation_HasArgument(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(StringLiteral node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Literal)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Super node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(This node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeApplyExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
Base genNodeRef;
// edge: hasRawType
genNodeRef = node.getRawType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitTypeApplyExpression_HasRawType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeApplyExpression_HasRawType(node, end);
}
// edge: hasTypeArguments
for (EdgeIterator<TypeExpression> it = node.getTypeArgumentsIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitTypeApplyExpression_HasTypeArguments(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeApplyExpression_HasTypeArguments(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeCast node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Unary)node, false);
Base genNodeRef;
// edge: hasTypeOperand
genNodeRef = node.getTypeOperand();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitTypeCast_HasTypeOperand(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeCast_HasTypeOperand(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeIntersectionExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
// edge: hasBounds
for (EdgeIterator<TypeExpression> it = node.getBoundsIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitTypeIntersectionExpression_HasBounds(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeIntersectionExpression_HasBounds(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeUnionExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
// edge: hasAlternatives
for (EdgeIterator<TypeExpression> it = node.getAlternativesIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitTypeUnionExpression_HasAlternatives(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeUnionExpression_HasAlternatives(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Unary node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Expression)node, false);
Base genNodeRef;
// edge: hasOperand
genNodeRef = node.getOperand();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitUnary_HasOperand(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndUnary_HasOperand(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(WildcardExpression node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((TypeExpression)node, false);
Base genNodeRef;
// edge: hasBound
genNodeRef = node.getBound();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitWildcardExpression_HasBound(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndWildcardExpression_HasBound(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Exports node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((ModuleDirective)node, false);
Base genNodeRef;
// edge: hasPackageName
genNodeRef = node.getPackageName();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitExports_HasPackageName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndExports_HasPackageName(node, end);
}
// edge: hasModuleNames
for (EdgeIterator<Expression> it = node.getModuleNamesIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitExports_HasModuleNames(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndExports_HasModuleNames(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ModuleDirective node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Opens node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((ModuleDirective)node, false);
Base genNodeRef;
// edge: hasPackageName
genNodeRef = node.getPackageName();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitOpens_HasPackageName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndOpens_HasPackageName(node, end);
}
// edge: hasModuleNames
for (EdgeIterator<Expression> it = node.getModuleNamesIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitOpens_HasModuleNames(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndOpens_HasModuleNames(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Provides node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((ModuleDirective)node, false);
Base genNodeRef;
// edge: hasServiceName
genNodeRef = node.getServiceName();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitProvides_HasServiceName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndProvides_HasServiceName(node, end);
}
// edge: hasImplementationNames
for (EdgeIterator<Expression> it = node.getImplementationNamesIterator(); it.hasNext(); ) {
Expression end = it.next();
visitor.visitProvides_HasImplementationNames(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndProvides_HasImplementationNames(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Requires node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((ModuleDirective)node, false);
Base genNodeRef;
// edge: hasModuleName
genNodeRef = node.getModuleName();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitRequires_HasModuleName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndRequires_HasModuleName(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Uses node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((ModuleDirective)node, false);
Base genNodeRef;
// edge: hasServiceName
genNodeRef = node.getServiceName();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitUses_HasServiceName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndUses_HasServiceName(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Assert node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasCondition
genNodeRef = node.getCondition();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitAssert_HasCondition(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndAssert_HasCondition(node, end);
}
// edge: hasDetail
genNodeRef = node.getDetail();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitAssert_HasDetail(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndAssert_HasDetail(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(BasicFor node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((For)node, false);
Base genNodeRef;
// edge: hasInitializers
for (EdgeIterator<Statement> it = node.getInitializersIterator(); it.hasNext(); ) {
Statement end = it.next();
visitor.visitBasicFor_HasInitializers(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndBasicFor_HasInitializers(node, end);
}
// edge: hasCondition
genNodeRef = node.getCondition();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitBasicFor_HasCondition(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndBasicFor_HasCondition(node, end);
}
// edge: hasUpdates
for (EdgeIterator<Statement> it = node.getUpdatesIterator(); it.hasNext(); ) {
Statement end = it.next();
visitor.visitBasicFor_HasUpdates(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndBasicFor_HasUpdates(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Block node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
// edge: hasStatements
for (EdgeIterator<Statement> it = node.getStatementsIterator(); it.hasNext(); ) {
Statement end = it.next();
visitor.visitBlock_HasStatements(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndBlock_HasStatements(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Break node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Jump)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Case node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((SwitchLabel)node, false);
Base genNodeRef;
// edge: hasExpression
genNodeRef = node.getExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitCase_HasExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndCase_HasExpression(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Continue node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Jump)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Default node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((SwitchLabel)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Do node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Iteration)node, false);
Base genNodeRef;
// edge: hasCondition
genNodeRef = node.getCondition();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitDo_HasCondition(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndDo_HasCondition(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Empty node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(EnhancedFor node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((For)node, false);
Base genNodeRef;
// edge: hasParameter
genNodeRef = node.getParameter();
if (genNodeRef != null) {
Parameter end = (Parameter)genNodeRef;
visitor.visitEnhancedFor_HasParameter(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndEnhancedFor_HasParameter(node, end);
}
// edge: hasExpression
genNodeRef = node.getExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitEnhancedFor_HasExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndEnhancedFor_HasExpression(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ExpressionStatement node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasExpression
genNodeRef = node.getExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitExpressionStatement_HasExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndExpressionStatement_HasExpression(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(For node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Iteration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Handler node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
Base genNodeRef;
// edge: hasParameter
genNodeRef = node.getParameter();
if (genNodeRef != null) {
Parameter end = (Parameter)genNodeRef;
visitor.visitHandler_HasParameter(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndHandler_HasParameter(node, end);
}
// edge: hasBlock
genNodeRef = node.getBlock();
if (genNodeRef != null) {
Block end = (Block)genNodeRef;
visitor.visitHandler_HasBlock(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndHandler_HasBlock(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(If node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Selection)node, false);
Base genNodeRef;
// edge: hasSubstatement
genNodeRef = node.getSubstatement();
if (genNodeRef != null) {
Statement end = (Statement)genNodeRef;
visitor.visitIf_HasSubstatement(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndIf_HasSubstatement(node, end);
}
// edge: hasFalseSubstatement
genNodeRef = node.getFalseSubstatement();
if (genNodeRef != null) {
Statement end = (Statement)genNodeRef;
visitor.visitIf_HasFalseSubstatement(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndIf_HasFalseSubstatement(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Iteration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasSubstatement
genNodeRef = node.getSubstatement();
if (genNodeRef != null) {
Statement end = (Statement)genNodeRef;
visitor.visitIteration_HasSubstatement(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndIteration_HasSubstatement(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Jump node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: target
genNodeRef = node.getTarget();
if (genNodeRef != null) {
Statement end = (Statement)genNodeRef;
visitor.visitJump_Target(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndJump_Target(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(LabeledStatement node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasStatement
genNodeRef = node.getStatement();
if (genNodeRef != null) {
Statement end = (Statement)genNodeRef;
visitor.visitLabeledStatement_HasStatement(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndLabeledStatement_HasStatement(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Return node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasExpression
genNodeRef = node.getExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitReturn_HasExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndReturn_HasExpression(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Selection node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasCondition
genNodeRef = node.getCondition();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitSelection_HasCondition(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndSelection_HasCondition(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Statement node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Switch node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Selection)node, false);
// edge: hasCases
for (EdgeIterator<SwitchLabel> it = node.getCasesIterator(); it.hasNext(); ) {
SwitchLabel end = it.next();
visitor.visitSwitch_HasCases(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndSwitch_HasCases(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(SwitchLabel node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
// edge: hasStatements
for (EdgeIterator<Statement> it = node.getStatementsIterator(); it.hasNext(); ) {
Statement end = it.next();
visitor.visitSwitchLabel_HasStatements(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndSwitchLabel_HasStatements(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Synchronized node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasLock
genNodeRef = node.getLock();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitSynchronized_HasLock(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndSynchronized_HasLock(node, end);
}
// edge: hasBlock
genNodeRef = node.getBlock();
if (genNodeRef != null) {
Block end = (Block)genNodeRef;
visitor.visitSynchronized_HasBlock(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndSynchronized_HasBlock(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Throw node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasExpression
genNodeRef = node.getExpression();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitThrow_HasExpression(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndThrow_HasExpression(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Try node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Statement)node, false);
Base genNodeRef;
// edge: hasResources
for (EdgeIterator<Base> it = node.getResourcesIterator(); it.hasNext(); ) {
Base end = it.next();
visitor.visitTry_HasResources(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTry_HasResources(node, end);
}
// edge: hasBlock
genNodeRef = node.getBlock();
if (genNodeRef != null) {
Block end = (Block)genNodeRef;
visitor.visitTry_HasBlock(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTry_HasBlock(node, end);
}
// edge: hasHandlers
for (EdgeIterator<Handler> it = node.getHandlersIterator(); it.hasNext(); ) {
Handler end = it.next();
visitor.visitTry_HasHandlers(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTry_HasHandlers(node, end);
}
// edge: hasFinallyBlock
genNodeRef = node.getFinallyBlock();
if (genNodeRef != null) {
Block end = (Block)genNodeRef;
visitor.visitTry_HasFinallyBlock(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTry_HasFinallyBlock(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(While node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Iteration)node, false);
Base genNodeRef;
// edge: hasCondition
genNodeRef = node.getCondition();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitWhile_HasCondition(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndWhile_HasCondition(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(AnnotatedElement node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
// edge: hasAnnotations
for (EdgeIterator<Annotation> it = node.getAnnotationsIterator(); it.hasNext(); ) {
Annotation end = it.next();
visitor.visitAnnotatedElement_HasAnnotations(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndAnnotatedElement_HasAnnotations(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(AnnotationType node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((TypeDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(AnnotationTypeElement node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((MethodDeclaration)node, false);
Base genNodeRef;
// edge: hasDefaultValue
genNodeRef = node.getDefaultValue();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitAnnotationTypeElement_HasDefaultValue(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndAnnotationTypeElement_HasDefaultValue(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(AnonymousClass node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((ClassDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Class node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((ClassDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ClassDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((TypeDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ClassGeneric node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((ClassDeclaration)node, false);
traverse((GenericDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(CompilationUnit node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
traverse((PositionedWithoutComment)node, false);
traverse((Commentable)node, false);
Base genNodeRef;
// edge: hasPackageDeclaration
genNodeRef = node.getPackageDeclaration();
if (genNodeRef != null) {
PackageDeclaration end = (PackageDeclaration)genNodeRef;
visitor.visitCompilationUnit_HasPackageDeclaration(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndCompilationUnit_HasPackageDeclaration(node, end);
}
// edge: hasImports
for (EdgeIterator<Import> it = node.getImportsIterator(); it.hasNext(); ) {
Import end = it.next();
visitor.visitCompilationUnit_HasImports(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndCompilationUnit_HasImports(node, end);
}
// edge: hasOthers
for (EdgeIterator<Positioned> it = node.getOthersIterator(); it.hasNext(); ) {
Positioned end = it.next();
visitor.visitCompilationUnit_HasOthers(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndCompilationUnit_HasOthers(node, end);
}
// edge: hasModuleDeclaration
genNodeRef = node.getModuleDeclaration();
if (genNodeRef != null) {
ModuleDeclaration end = (ModuleDeclaration)genNodeRef;
visitor.visitCompilationUnit_HasModuleDeclaration(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndCompilationUnit_HasModuleDeclaration(node, end);
}
// edge: typeDeclarations
for (EdgeIterator<TypeDeclaration> it = node.getTypeDeclarationsIterator(); it.hasNext(); ) {
TypeDeclaration end = it.next();
visitor.visitCompilationUnit_TypeDeclarations(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndCompilationUnit_TypeDeclarations(node, end);
}
// edge: isInModule
genNodeRef = node.getIsInModule();
if (genNodeRef != null) {
Module end = (Module)genNodeRef;
visitor.visitCompilationUnit_IsInModule(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndCompilationUnit_IsInModule(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Declaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((Statement)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Enum node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((TypeDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(EnumConstant node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((VariableDeclaration)node, false);
Base genNodeRef;
// edge: hasNewClass
genNodeRef = node.getNewClass();
if (genNodeRef != null) {
NewClass end = (NewClass)genNodeRef;
visitor.visitEnumConstant_HasNewClass(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndEnumConstant_HasNewClass(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(GenericDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
// edge: hasTypeParameters
for (EdgeIterator<TypeParameter> it = node.getTypeParametersIterator(); it.hasNext(); ) {
TypeParameter end = it.next();
visitor.visitGenericDeclaration_HasTypeParameters(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndGenericDeclaration_HasTypeParameters(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Import node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
Base genNodeRef;
// edge: hasTarget
genNodeRef = node.getTarget();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitImport_HasTarget(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndImport_HasTarget(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(InitializerBlock node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((Declaration)node, false);
Base genNodeRef;
// edge: hasBody
genNodeRef = node.getBody();
if (genNodeRef != null) {
Block end = (Block)genNodeRef;
visitor.visitInitializerBlock_HasBody(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndInitializerBlock_HasBody(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(InstanceInitializerBlock node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((InitializerBlock)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Interface node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((InterfaceDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(InterfaceDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((TypeDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(InterfaceGeneric node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((InterfaceDeclaration)node, false);
traverse((GenericDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Member node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((AnnotatedElement)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Method node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((NormalMethod)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(MethodDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((NamedDeclaration)node, false);
Base genNodeRef;
// edge: hasReturnType
genNodeRef = node.getReturnType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitMethodDeclaration_HasReturnType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndMethodDeclaration_HasReturnType(node, end);
}
// edge: methodType
genNodeRef = node.getMethodType();
if (genNodeRef != null) {
MethodType end = (MethodType)genNodeRef;
visitor.visitMethodDeclaration_MethodType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndMethodDeclaration_MethodType(node, end);
}
// edge: overrides
for (EdgeIterator<MethodDeclaration> it = node.getOverridesIterator(); it.hasNext(); ) {
MethodDeclaration end = it.next();
visitor.visitMethodDeclaration_Overrides(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndMethodDeclaration_Overrides(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(MethodGeneric node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((NormalMethod)node, false);
traverse((GenericDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Module node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
traverse((Named)node, false);
// edge: packages
for (EdgeIterator<Package> it = node.getPackagesIterator(); it.hasNext(); ) {
Package end = it.next();
visitor.visitModule_Packages(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndModule_Packages(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ModuleDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
Base genNodeRef;
// edge: hasName
genNodeRef = node.getName();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitModuleDeclaration_HasName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndModuleDeclaration_HasName(node, end);
}
// edge: hasDirectives
for (EdgeIterator<ModuleDirective> it = node.getDirectivesIterator(); it.hasNext(); ) {
ModuleDirective end = it.next();
visitor.visitModuleDeclaration_HasDirectives(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndModuleDeclaration_HasDirectives(node, end);
}
// edge: moduleType
genNodeRef = node.getModuleType();
if (genNodeRef != null) {
ModuleType end = (ModuleType)genNodeRef;
visitor.visitModuleDeclaration_ModuleType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndModuleDeclaration_ModuleType(node, end);
}
// edge: refersTo
genNodeRef = node.getRefersTo();
if (genNodeRef != null) {
Module end = (Module)genNodeRef;
visitor.visitModuleDeclaration_RefersTo(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndModuleDeclaration_RefersTo(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NamedDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((Declaration)node, false);
traverse((Named)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NormalMethod node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((MethodDeclaration)node, false);
Base genNodeRef;
// edge: hasParameters
for (EdgeIterator<Parameter> it = node.getParametersIterator(); it.hasNext(); ) {
Parameter end = it.next();
visitor.visitNormalMethod_HasParameters(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNormalMethod_HasParameters(node, end);
}
// edge: hasBody
genNodeRef = node.getBody();
if (genNodeRef != null) {
Block end = (Block)genNodeRef;
visitor.visitNormalMethod_HasBody(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNormalMethod_HasBody(node, end);
}
// edge: hasThrownExceptions
for (EdgeIterator<TypeExpression> it = node.getThrownExceptionsIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitNormalMethod_HasThrownExceptions(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndNormalMethod_HasThrownExceptions(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Package node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((Named)node, false);
traverse((Scope)node, false);
// edge: hasCompilationUnits
for (EdgeIterator<CompilationUnit> it = node.getCompilationUnitsIterator(); it.hasNext(); ) {
CompilationUnit end = it.next();
visitor.visitPackage_HasCompilationUnits(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndPackage_HasCompilationUnits(node, end);
}
// edge: isInModule
for (EdgeIterator<Module> it = node.getIsInModuleIterator(); it.hasNext(); ) {
Module end = it.next();
visitor.visitPackage_IsInModule(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndPackage_IsInModule(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PackageDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
Base genNodeRef;
// edge: hasPackageName
genNodeRef = node.getPackageName();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitPackageDeclaration_HasPackageName(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndPackageDeclaration_HasPackageName(node, end);
}
// edge: refersTo
genNodeRef = node.getRefersTo();
if (genNodeRef != null) {
Package end = (Package)genNodeRef;
visitor.visitPackageDeclaration_RefersTo(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndPackageDeclaration_RefersTo(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Parameter node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((VariableDeclaration)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Scope node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
// edge: hasMembers
for (EdgeIterator<Member> it = node.getMembersIterator(); it.hasNext(); ) {
Member end = it.next();
visitor.visitScope_HasMembers(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndScope_HasMembers(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(StaticInitializerBlock node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((InitializerBlock)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((NamedDeclaration)node, false);
traverse((Scope)node, false);
Base genNodeRef;
// edge: hasSuperClass
genNodeRef = node.getSuperClass();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitTypeDeclaration_HasSuperClass(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeDeclaration_HasSuperClass(node, end);
}
// edge: hasSuperInterfaces
for (EdgeIterator<TypeExpression> it = node.getSuperInterfacesIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitTypeDeclaration_HasSuperInterfaces(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeDeclaration_HasSuperInterfaces(node, end);
}
// edge: hasOthers
for (EdgeIterator<Positioned> it = node.getOthersIterator(); it.hasNext(); ) {
Positioned end = it.next();
visitor.visitTypeDeclaration_HasOthers(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeDeclaration_HasOthers(node, end);
}
// edge: isInCompilationUnit
genNodeRef = node.getIsInCompilationUnit();
if (genNodeRef != null) {
CompilationUnit end = (CompilationUnit)genNodeRef;
visitor.visitTypeDeclaration_IsInCompilationUnit(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndTypeDeclaration_IsInCompilationUnit(node, end);
}
// edge: isInModule
genNodeRef = node.getIsInModule();
if (genNodeRef != null) {
Module end = (Module)genNodeRef;
visitor.visitTypeDeclaration_IsInModule(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndTypeDeclaration_IsInModule(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeParameter node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
traverse((Positioned)node, false);
traverse((Named)node, false);
// edge: hasBounds
for (EdgeIterator<TypeExpression> it = node.getBoundsIterator(); it.hasNext(); ) {
TypeExpression end = it.next();
visitor.visitTypeParameter_HasBounds(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndTypeParameter_HasBounds(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Variable node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((VariableDeclaration)node, false);
Base genNodeRef;
// edge: hasInitialValue
genNodeRef = node.getInitialValue();
if (genNodeRef != null) {
Expression end = (Expression)genNodeRef;
visitor.visitVariable_HasInitialValue(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndVariable_HasInitialValue(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(VariableDeclaration node, boolean callVirtualBase) {
if (callVirtualBase)
traverse((Base)node, false);
if (callVirtualBase)
traverse((Commentable)node, false);
if (callVirtualBase)
traverse((Member)node, false);
traverse((NamedDeclaration)node, false);
Base genNodeRef;
// edge: hasType
genNodeRef = node.getType();
if (genNodeRef != null) {
TypeExpression end = (TypeExpression)genNodeRef;
visitor.visitVariableDeclaration_HasType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
} else {
recRun(end);
}
visitor.visitEndVariableDeclaration_HasType(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ArrayType node, boolean callVirtualBase) {
traverse((Type)node, false);
Base genNodeRef;
// edge: componentType
genNodeRef = node.getComponentType();
if (genNodeRef != null) {
Type end = (Type)genNodeRef;
visitor.visitArrayType_ComponentType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndArrayType_ComponentType(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(BooleanType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(BoundedWildcardType node, boolean callVirtualBase) {
traverse((WildcardType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ByteType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(CharType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ClassType node, boolean callVirtualBase) {
traverse((ScopedType)node, false);
Base genNodeRef;
// edge: refersTo
genNodeRef = node.getRefersTo();
if (genNodeRef != null) {
TypeDeclaration end = (TypeDeclaration)genNodeRef;
visitor.visitClassType_RefersTo(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndClassType_RefersTo(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(DoubleType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ErrorType node, boolean callVirtualBase) {
traverse((Type)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(FloatType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(IntType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(IntersectionType node, boolean callVirtualBase) {
traverse((Type)node, false);
// edge: bounds
for (EdgeIterator<Type> it = node.getBoundsIterator(); it.hasNext(); ) {
Type end = it.next();
visitor.visitIntersectionType_Bounds(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndIntersectionType_Bounds(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(LongType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(LowerBoundedWildcardType node, boolean callVirtualBase) {
traverse((BoundedWildcardType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(MethodType node, boolean callVirtualBase) {
traverse((Type)node, false);
Base genNodeRef;
// edge: returnType
genNodeRef = node.getReturnType();
if (genNodeRef != null) {
Type end = (Type)genNodeRef;
visitor.visitMethodType_ReturnType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndMethodType_ReturnType(node, end);
}
// edge: parameterTypes
for (EdgeIterator<Type> it = node.getParameterTypesIterator(); it.hasNext(); ) {
Type end = it.next();
visitor.visitMethodType_ParameterTypes(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndMethodType_ParameterTypes(node, end);
}
// edge: thrownTypes
for (EdgeIterator<Type> it = node.getThrownTypesIterator(); it.hasNext(); ) {
Type end = it.next();
visitor.visitMethodType_ThrownTypes(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndMethodType_ThrownTypes(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ModuleType node, boolean callVirtualBase) {
traverse((Type)node, false);
Base genNodeRef;
// edge: refersTo
genNodeRef = node.getRefersTo();
if (genNodeRef != null) {
Module end = (Module)genNodeRef;
visitor.visitModuleType_RefersTo(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndModuleType_RefersTo(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NoType node, boolean callVirtualBase) {
traverse((Type)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(NullType node, boolean callVirtualBase) {
traverse((Type)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PackageType node, boolean callVirtualBase) {
traverse((Type)node, false);
Base genNodeRef;
// edge: refersTo
genNodeRef = node.getRefersTo();
if (genNodeRef != null) {
Package end = (Package)genNodeRef;
visitor.visitPackageType_RefersTo(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndPackageType_RefersTo(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ParameterizedType node, boolean callVirtualBase) {
traverse((ScopedType)node, false);
Base genNodeRef;
// edge: rawType
genNodeRef = node.getRawType();
if (genNodeRef != null) {
Type end = (Type)genNodeRef;
visitor.visitParameterizedType_RawType(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndParameterizedType_RawType(node, end);
}
// edge: argumentTypes
for (EdgeIterator<Type> it = node.getArgumentTypesIterator(); it.hasNext(); ) {
Type end = it.next();
visitor.visitParameterizedType_ArgumentTypes(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndParameterizedType_ArgumentTypes(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(PrimitiveType node, boolean callVirtualBase) {
traverse((Type)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ScopedType node, boolean callVirtualBase) {
traverse((Type)node, false);
Base genNodeRef;
// edge: owner
genNodeRef = node.getOwner();
if (genNodeRef != null) {
Type end = (Type)genNodeRef;
visitor.visitScopedType_Owner(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndScopedType_Owner(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(ShortType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(Type node, boolean callVirtualBase) {
traverse((Base)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(TypeVariable node, boolean callVirtualBase) {
traverse((Type)node, false);
Base genNodeRef;
// edge: refersTo
genNodeRef = node.getRefersTo();
if (genNodeRef != null) {
TypeParameter end = (TypeParameter)genNodeRef;
visitor.visitTypeVariable_RefersTo(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndTypeVariable_RefersTo(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(UnboundedWildcardType node, boolean callVirtualBase) {
traverse((WildcardType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(UnionType node, boolean callVirtualBase) {
traverse((Type)node, false);
// edge: alternatives
for (EdgeIterator<Type> it = node.getAlternativesIterator(); it.hasNext(); ) {
Type end = it.next();
visitor.visitUnionType_Alternatives(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndUnionType_Alternatives(node, end);
}
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(UpperBoundedWildcardType node, boolean callVirtualBase) {
traverse((BoundedWildcardType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(VoidType node, boolean callVirtualBase) {
traverse((PrimitiveType)node, false);
}
/**
* Traverse the given node.
* @param node The node which is traversed.
* @param callVirtualBase Helper flag which determines whether to call overloaded methods for virtual base classes. Methods for non-virtual base classes are called directly.
*/
protected void traverse(WildcardType node, boolean callVirtualBase) {
traverse((Type)node, false);
Base genNodeRef;
// edge: bound
genNodeRef = node.getBound();
if (genNodeRef != null) {
Type end = (Type)genNodeRef;
visitor.visitWildcardType_Bound(node, end);
if (apRoot && visitUsedSpecialNodesOnly && Common.getIsAPSpecNode(end)) {
unvisitedNodes[end.getId()] = true;
}
visitor.visitEndWildcardType_Bound(node, end);
}
}
}
| 153,900 | 31.898888 | 242 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/EnhancedForImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.struc.Parameter;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.EnhancedFor EnhancedFor} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class EnhancedForImpl extends BaseImpl implements EnhancedFor {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(EnhancedForImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasSubstatement;
protected Object leftParenPosition;
protected Object rightParenPosition;
protected Object colonPosition;
protected int _hasParameter;
protected int _hasExpression;
public EnhancedForImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
leftParenPosition = new Range(factory.getStringTable());
rightParenPosition = new Range(factory.getStringTable());
colonPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkEnhancedFor;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getLeftParenPosition() {
return (Range)leftParenPosition;
}
@Override
public Range getRightParenPosition() {
return (Range)rightParenPosition;
}
@Override
public void setLeftParenPosition(Range _leftParenPosition) {
if (factory.getStringTable() == _leftParenPosition.getStringTable())
leftParenPosition = _leftParenPosition;
else
leftParenPosition = new Range(factory.getStringTable(), _leftParenPosition);
}
@Override
public void setRightParenPosition(Range _rightParenPosition) {
if (factory.getStringTable() == _rightParenPosition.getStringTable())
rightParenPosition = _rightParenPosition;
else
rightParenPosition = new Range(factory.getStringTable(), _rightParenPosition);
}
@Override
public Range getColonPosition() {
return (Range)colonPosition;
}
@Override
public void setColonPosition(Range _colonPosition) {
if (factory.getStringTable() == _colonPosition.getStringTable())
colonPosition = _colonPosition;
else
colonPosition = new Range(factory.getStringTable(), _colonPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Statement getSubstatement() {
if (_hasSubstatement == 0)
return null;
if (factory.getIsFiltered(_hasSubstatement))
return null;
return (Statement)factory.getRef(_hasSubstatement);
}
@Override
public void setSubstatement(int _id) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_hasSubstatement = _id;
setParentEdge(_hasSubstatement);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setSubstatement(Statement _node) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
_hasSubstatement = _node.getId();
setParentEdge(_hasSubstatement);
}
@Override
public Parameter getParameter() {
if (_hasParameter == 0)
return null;
if (factory.getIsFiltered(_hasParameter))
return null;
return (Parameter)factory.getRef(_hasParameter);
}
@Override
public Expression getExpression() {
if (_hasExpression == 0)
return null;
if (factory.getIsFiltered(_hasExpression))
return null;
return (Expression)factory.getRef(_hasExpression);
}
@Override
public void setParameter(int _id) {
if (_hasParameter != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasParameter" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkParameter) {
_hasParameter = _id;
setParentEdge(_hasParameter);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setParameter(Parameter _node) {
if (_hasParameter != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasParameter" ));
_hasParameter = _node.getId();
setParentEdge(_hasParameter);
}
@Override
public void setExpression(int _id) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasExpression = _id;
setParentEdge(_hasExpression);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setExpression(Expression _node) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
_hasExpression = _node.getId();
setParentEdge(_hasExpression);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasSubstatement) ? _hasSubstatement : 0);
io.writeInt4(((Range)leftParenPosition).getPathKey());
io.writeInt4(((Range)leftParenPosition).getLine());
io.writeInt4(((Range)leftParenPosition).getCol());
io.writeInt4(((Range)leftParenPosition).getEndLine());
io.writeInt4(((Range)leftParenPosition).getEndCol());
io.writeInt4(((Range)leftParenPosition).getWideLine());
io.writeInt4(((Range)leftParenPosition).getWideCol());
io.writeInt4(((Range)leftParenPosition).getWideEndLine());
io.writeInt4(((Range)leftParenPosition).getWideEndCol());
io.writeInt4(((Range)rightParenPosition).getPathKey());
io.writeInt4(((Range)rightParenPosition).getLine());
io.writeInt4(((Range)rightParenPosition).getCol());
io.writeInt4(((Range)rightParenPosition).getEndLine());
io.writeInt4(((Range)rightParenPosition).getEndCol());
io.writeInt4(((Range)rightParenPosition).getWideLine());
io.writeInt4(((Range)rightParenPosition).getWideCol());
io.writeInt4(((Range)rightParenPosition).getWideEndLine());
io.writeInt4(((Range)rightParenPosition).getWideEndCol());
io.writeInt4(((Range)colonPosition).getPathKey());
io.writeInt4(((Range)colonPosition).getLine());
io.writeInt4(((Range)colonPosition).getCol());
io.writeInt4(((Range)colonPosition).getEndLine());
io.writeInt4(((Range)colonPosition).getEndCol());
io.writeInt4(((Range)colonPosition).getWideLine());
io.writeInt4(((Range)colonPosition).getWideCol());
io.writeInt4(((Range)colonPosition).getWideEndLine());
io.writeInt4(((Range)colonPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasParameter) ? _hasParameter : 0);
io.writeInt4(!factory.getIsFiltered(_hasExpression) ? _hasExpression : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasSubstatement = io.readInt4();
if (_hasSubstatement != 0)
setParentEdge(_hasSubstatement);
((Range)leftParenPosition).setPathKey(io.readInt4());
((Range)leftParenPosition).setLine(io.readInt4());
((Range)leftParenPosition).setCol(io.readInt4());
((Range)leftParenPosition).setEndLine(io.readInt4());
((Range)leftParenPosition).setEndCol(io.readInt4());
((Range)leftParenPosition).setWideLine(io.readInt4());
((Range)leftParenPosition).setWideCol(io.readInt4());
((Range)leftParenPosition).setWideEndLine(io.readInt4());
((Range)leftParenPosition).setWideEndCol(io.readInt4());
((Range)rightParenPosition).setPathKey(io.readInt4());
((Range)rightParenPosition).setLine(io.readInt4());
((Range)rightParenPosition).setCol(io.readInt4());
((Range)rightParenPosition).setEndLine(io.readInt4());
((Range)rightParenPosition).setEndCol(io.readInt4());
((Range)rightParenPosition).setWideLine(io.readInt4());
((Range)rightParenPosition).setWideCol(io.readInt4());
((Range)rightParenPosition).setWideEndLine(io.readInt4());
((Range)rightParenPosition).setWideEndCol(io.readInt4());
((Range)colonPosition).setPathKey(io.readInt4());
((Range)colonPosition).setLine(io.readInt4());
((Range)colonPosition).setCol(io.readInt4());
((Range)colonPosition).setEndLine(io.readInt4());
((Range)colonPosition).setEndCol(io.readInt4());
((Range)colonPosition).setWideLine(io.readInt4());
((Range)colonPosition).setWideCol(io.readInt4());
((Range)colonPosition).setWideEndLine(io.readInt4());
((Range)colonPosition).setWideEndCol(io.readInt4());
_hasParameter = io.readInt4();
if (_hasParameter != 0)
setParentEdge(_hasParameter);
_hasExpression = io.readInt4();
if (_hasExpression != 0)
setParentEdge(_hasExpression);
}
}
| 13,853 | 28.793548 | 133 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/IfImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.If If} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class IfImpl extends BaseImpl implements If {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(IfImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasCondition;
protected Object elsePosition;
protected int _hasSubstatement;
protected int _hasFalseSubstatement;
public IfImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
elsePosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkIf;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getElsePosition() {
return (Range)elsePosition;
}
@Override
public void setElsePosition(Range _elsePosition) {
if (factory.getStringTable() == _elsePosition.getStringTable())
elsePosition = _elsePosition;
else
elsePosition = new Range(factory.getStringTable(), _elsePosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getCondition() {
if (_hasCondition == 0)
return null;
if (factory.getIsFiltered(_hasCondition))
return null;
return (Expression)factory.getRef(_hasCondition);
}
@Override
public void setCondition(int _id) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasCondition = _id;
setParentEdge(_hasCondition);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setCondition(Expression _node) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
_hasCondition = _node.getId();
setParentEdge(_hasCondition);
}
@Override
public Statement getSubstatement() {
if (_hasSubstatement == 0)
return null;
if (factory.getIsFiltered(_hasSubstatement))
return null;
return (Statement)factory.getRef(_hasSubstatement);
}
@Override
public Statement getFalseSubstatement() {
if (_hasFalseSubstatement == 0)
return null;
if (factory.getIsFiltered(_hasFalseSubstatement))
return null;
return (Statement)factory.getRef(_hasFalseSubstatement);
}
@Override
public void setSubstatement(int _id) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_hasSubstatement = _id;
setParentEdge(_hasSubstatement);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setSubstatement(Statement _node) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
_hasSubstatement = _node.getId();
setParentEdge(_hasSubstatement);
}
@Override
public void setFalseSubstatement(int _id) {
if (_hasFalseSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasFalseSubstatement" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_hasFalseSubstatement = _id;
setParentEdge(_hasFalseSubstatement);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setFalseSubstatement(Statement _node) {
if (_hasFalseSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasFalseSubstatement" ));
_hasFalseSubstatement = _node.getId();
setParentEdge(_hasFalseSubstatement);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasCondition) ? _hasCondition : 0);
io.writeInt4(((Range)elsePosition).getPathKey());
io.writeInt4(((Range)elsePosition).getLine());
io.writeInt4(((Range)elsePosition).getCol());
io.writeInt4(((Range)elsePosition).getEndLine());
io.writeInt4(((Range)elsePosition).getEndCol());
io.writeInt4(((Range)elsePosition).getWideLine());
io.writeInt4(((Range)elsePosition).getWideCol());
io.writeInt4(((Range)elsePosition).getWideEndLine());
io.writeInt4(((Range)elsePosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasSubstatement) ? _hasSubstatement : 0);
io.writeInt4(!factory.getIsFiltered(_hasFalseSubstatement) ? _hasFalseSubstatement : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasCondition = io.readInt4();
if (_hasCondition != 0)
setParentEdge(_hasCondition);
((Range)elsePosition).setPathKey(io.readInt4());
((Range)elsePosition).setLine(io.readInt4());
((Range)elsePosition).setCol(io.readInt4());
((Range)elsePosition).setEndLine(io.readInt4());
((Range)elsePosition).setEndCol(io.readInt4());
((Range)elsePosition).setWideLine(io.readInt4());
((Range)elsePosition).setWideCol(io.readInt4());
((Range)elsePosition).setWideEndLine(io.readInt4());
((Range)elsePosition).setWideEndCol(io.readInt4());
_hasSubstatement = io.readInt4();
if (_hasSubstatement != 0)
setParentEdge(_hasSubstatement);
_hasFalseSubstatement = io.readInt4();
if (_hasFalseSubstatement != 0)
setParentEdge(_hasFalseSubstatement);
}
}
| 10,891 | 26.64467 | 124 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/SynchronizedImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Synchronized Synchronized} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class SynchronizedImpl extends BaseImpl implements Synchronized {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(SynchronizedImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasLock;
protected int _hasBlock;
public SynchronizedImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkSynchronized;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getLock() {
if (_hasLock == 0)
return null;
if (factory.getIsFiltered(_hasLock))
return null;
return (Expression)factory.getRef(_hasLock);
}
@Override
public Block getBlock() {
if (_hasBlock == 0)
return null;
if (factory.getIsFiltered(_hasBlock))
return null;
return (Block)factory.getRef(_hasBlock);
}
@Override
public void setLock(int _id) {
if (_hasLock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasLock" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasLock = _id;
setParentEdge(_hasLock);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setLock(Expression _node) {
if (_hasLock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasLock" ));
_hasLock = _node.getId();
setParentEdge(_hasLock);
}
@Override
public void setBlock(int _id) {
if (_hasBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasBlock" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkBlock) {
_hasBlock = _id;
setParentEdge(_hasBlock);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setBlock(Block _node) {
if (_hasBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasBlock" ));
_hasBlock = _node.getId();
setParentEdge(_hasBlock);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasLock) ? _hasLock : 0);
io.writeInt4(!factory.getIsFiltered(_hasBlock) ? _hasBlock : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasLock = io.readInt4();
if (_hasLock != 0)
setParentEdge(_hasLock);
_hasBlock = io.readInt4();
if (_hasBlock != 0)
setParentEdge(_hasBlock);
}
}
| 7,933 | 24.267516 | 134 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/ReturnImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Return Return} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class ReturnImpl extends BaseImpl implements Return {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(ReturnImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasExpression;
public ReturnImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkReturn;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getExpression() {
if (_hasExpression == 0)
return null;
if (factory.getIsFiltered(_hasExpression))
return null;
return (Expression)factory.getRef(_hasExpression);
}
@Override
public void setExpression(int _id) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasExpression = _id;
setParentEdge(_hasExpression);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setExpression(Expression _node) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
_hasExpression = _node.getId();
setParentEdge(_hasExpression);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasExpression) ? _hasExpression : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasExpression = io.readInt4();
if (_hasExpression != 0)
setParentEdge(_hasExpression);
}
}
| 6,884 | 24.405904 | 128 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/ThrowImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Throw Throw} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class ThrowImpl extends BaseImpl implements Throw {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(ThrowImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasExpression;
public ThrowImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkThrow;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getExpression() {
if (_hasExpression == 0)
return null;
if (factory.getIsFiltered(_hasExpression))
return null;
return (Expression)factory.getRef(_hasExpression);
}
@Override
public void setExpression(int _id) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasExpression = _id;
setParentEdge(_hasExpression);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setExpression(Expression _node) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
_hasExpression = _node.getId();
setParentEdge(_hasExpression);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasExpression) ? _hasExpression : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasExpression = io.readInt4();
if (_hasExpression != 0)
setParentEdge(_hasExpression);
}
}
| 6,877 | 24.380074 | 127 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/DoImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Do Do} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class DoImpl extends BaseImpl implements Do {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(DoImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasSubstatement;
protected Object whilePosition;
protected int _hasCondition;
public DoImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
whilePosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkDo;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getWhilePosition() {
return (Range)whilePosition;
}
@Override
public void setWhilePosition(Range _whilePosition) {
if (factory.getStringTable() == _whilePosition.getStringTable())
whilePosition = _whilePosition;
else
whilePosition = new Range(factory.getStringTable(), _whilePosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Statement getSubstatement() {
if (_hasSubstatement == 0)
return null;
if (factory.getIsFiltered(_hasSubstatement))
return null;
return (Statement)factory.getRef(_hasSubstatement);
}
@Override
public void setSubstatement(int _id) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_hasSubstatement = _id;
setParentEdge(_hasSubstatement);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setSubstatement(Statement _node) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
_hasSubstatement = _node.getId();
setParentEdge(_hasSubstatement);
}
@Override
public Expression getCondition() {
if (_hasCondition == 0)
return null;
if (factory.getIsFiltered(_hasCondition))
return null;
return (Expression)factory.getRef(_hasCondition);
}
@Override
public void setCondition(int _id) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasCondition = _id;
setParentEdge(_hasCondition);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setCondition(Expression _node) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
_hasCondition = _node.getId();
setParentEdge(_hasCondition);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasSubstatement) ? _hasSubstatement : 0);
io.writeInt4(((Range)whilePosition).getPathKey());
io.writeInt4(((Range)whilePosition).getLine());
io.writeInt4(((Range)whilePosition).getCol());
io.writeInt4(((Range)whilePosition).getEndLine());
io.writeInt4(((Range)whilePosition).getEndCol());
io.writeInt4(((Range)whilePosition).getWideLine());
io.writeInt4(((Range)whilePosition).getWideCol());
io.writeInt4(((Range)whilePosition).getWideEndLine());
io.writeInt4(((Range)whilePosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasCondition) ? _hasCondition : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasSubstatement = io.readInt4();
if (_hasSubstatement != 0)
setParentEdge(_hasSubstatement);
((Range)whilePosition).setPathKey(io.readInt4());
((Range)whilePosition).setLine(io.readInt4());
((Range)whilePosition).setCol(io.readInt4());
((Range)whilePosition).setEndLine(io.readInt4());
((Range)whilePosition).setEndCol(io.readInt4());
((Range)whilePosition).setWideLine(io.readInt4());
((Range)whilePosition).setWideCol(io.readInt4());
((Range)whilePosition).setWideEndLine(io.readInt4());
((Range)whilePosition).setWideEndCol(io.readInt4());
_hasCondition = io.readInt4();
if (_hasCondition != 0)
setParentEdge(_hasCondition);
}
}
| 9,512 | 26.102564 | 124 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/WhileImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.While While} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class WhileImpl extends BaseImpl implements While {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(WhileImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasSubstatement;
protected int _hasCondition;
public WhileImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkWhile;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Statement getSubstatement() {
if (_hasSubstatement == 0)
return null;
if (factory.getIsFiltered(_hasSubstatement))
return null;
return (Statement)factory.getRef(_hasSubstatement);
}
@Override
public void setSubstatement(int _id) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_hasSubstatement = _id;
setParentEdge(_hasSubstatement);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setSubstatement(Statement _node) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
_hasSubstatement = _node.getId();
setParentEdge(_hasSubstatement);
}
@Override
public Expression getCondition() {
if (_hasCondition == 0)
return null;
if (factory.getIsFiltered(_hasCondition))
return null;
return (Expression)factory.getRef(_hasCondition);
}
@Override
public void setCondition(int _id) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasCondition = _id;
setParentEdge(_hasCondition);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setCondition(Expression _node) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
_hasCondition = _node.getId();
setParentEdge(_hasCondition);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasSubstatement) ? _hasSubstatement : 0);
io.writeInt4(!factory.getIsFiltered(_hasCondition) ? _hasCondition : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasSubstatement = io.readInt4();
if (_hasSubstatement != 0)
setParentEdge(_hasSubstatement);
_hasCondition = io.readInt4();
if (_hasCondition != 0)
setParentEdge(_hasCondition);
}
}
| 8,166 | 24.926984 | 127 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/LabeledStatement.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
/**
* Interface LabeledStatement, which represents the {@link columbus.java.asg.statm.LabeledStatement LabeledStatement} node.
* @columbus.node (missing)
* @columbus.attr label (String) : (missing)
* @columbus.attr colonPosition (Range) : (missing)
* @columbus.edge hasStatement ({@link columbus.java.asg.statm.Statement Statement}, single) : (missing)
*/
public interface LabeledStatement extends Statement {
/**
* Gives back the {@link columbus.java.asg.statm.LabeledStatement#attributeLabel label} of the node.
* @return Returns with the label.
*/
public String getLabel();
/**
* Gives back the Key of {@link columbus.java.asg.statm.LabeledStatement#attributeLabel label} of the node.
* @return Returns with the Key of the label.
*/
public int getLabelKey();
/**
* Sets the {@link columbus.java.asg.statm.LabeledStatement#attributeLabel label} of the node.
* @param value The new value of the label.
*/
public void setLabel(String value);
/**
* Gives back the {@link columbus.java.asg.statm.LabeledStatement#attributeColonPosition colonPosition} of the node.
* @return Returns with the colonPosition.
*/
public Range getColonPosition();
/**
* Sets the {@link columbus.java.asg.statm.LabeledStatement#attributeColonPosition colonPosition} of the node.
* @param value The new value of the colonPosition.
*/
public void setColonPosition(Range value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.LabeledStatement#edgeHasStatement hasStatement} edge points to.
* @return Returns the end point of the hasStatement edge.
*/
public Statement getStatement();
/**
* Sets the {@link columbus.java.asg.statm.LabeledStatement#edgeHasStatement hasStatement} edge.
* @param id The new end point of the hasStatement edge.
*/
public void setStatement(int id);
/**
* Sets the {@link columbus.java.asg.statm.LabeledStatement#edgeHasStatement hasStatement} edge.
* @param node The new end point of the hasStatement edge.
*/
public void setStatement(Statement node);
}
| 2,859 | 33.047619 | 139 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Throw.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.expr.Expression;
/**
* Interface Throw, which represents the {@link columbus.java.asg.statm.Throw Throw} node.
* @columbus.node (missing)
* @columbus.edge hasExpression ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Throw extends Statement {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Throw#edgeHasExpression hasExpression} edge points to.
* @return Returns the end point of the hasExpression edge.
*/
public Expression getExpression();
/**
* Sets the {@link columbus.java.asg.statm.Throw#edgeHasExpression hasExpression} edge.
* @param id The new end point of the hasExpression edge.
*/
public void setExpression(int id);
/**
* Sets the {@link columbus.java.asg.statm.Throw#edgeHasExpression hasExpression} edge.
* @param node The new end point of the hasExpression edge.
*/
public void setExpression(Expression node);
}
| 1,729 | 32.269231 | 130 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/ExpressionStatement.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.expr.Expression;
/**
* Interface ExpressionStatement, which represents the {@link columbus.java.asg.statm.ExpressionStatement ExpressionStatement} node.
* @columbus.node (missing)
* @columbus.edge hasExpression ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface ExpressionStatement extends Statement {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.ExpressionStatement#edgeHasExpression hasExpression} edge points to.
* @return Returns the end point of the hasExpression edge.
*/
public Expression getExpression();
/**
* Sets the {@link columbus.java.asg.statm.ExpressionStatement#edgeHasExpression hasExpression} edge.
* @param id The new end point of the hasExpression edge.
*/
public void setExpression(int id);
/**
* Sets the {@link columbus.java.asg.statm.ExpressionStatement#edgeHasExpression hasExpression} edge.
* @param node The new end point of the hasExpression edge.
*/
public void setExpression(Expression node);
}
| 1,827 | 34.153846 | 144 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/HandlerImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.struc.Parameter;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Handler Handler} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class HandlerImpl extends BaseImpl implements Handler {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(HandlerImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected Object leftParenPosition;
protected Object rightParenPosition;
protected int _hasParameter;
protected int _hasBlock;
public HandlerImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
leftParenPosition = new Range(factory.getStringTable());
rightParenPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkHandler;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getLeftParenPosition() {
return (Range)leftParenPosition;
}
@Override
public Range getRightParenPosition() {
return (Range)rightParenPosition;
}
@Override
public void setLeftParenPosition(Range _leftParenPosition) {
if (factory.getStringTable() == _leftParenPosition.getStringTable())
leftParenPosition = _leftParenPosition;
else
leftParenPosition = new Range(factory.getStringTable(), _leftParenPosition);
}
@Override
public void setRightParenPosition(Range _rightParenPosition) {
if (factory.getStringTable() == _rightParenPosition.getStringTable())
rightParenPosition = _rightParenPosition;
else
rightParenPosition = new Range(factory.getStringTable(), _rightParenPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Parameter getParameter() {
if (_hasParameter == 0)
return null;
if (factory.getIsFiltered(_hasParameter))
return null;
return (Parameter)factory.getRef(_hasParameter);
}
@Override
public Block getBlock() {
if (_hasBlock == 0)
return null;
if (factory.getIsFiltered(_hasBlock))
return null;
return (Block)factory.getRef(_hasBlock);
}
@Override
public void setParameter(int _id) {
if (_hasParameter != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasParameter" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkParameter) {
_hasParameter = _id;
setParentEdge(_hasParameter);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setParameter(Parameter _node) {
if (_hasParameter != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasParameter" ));
_hasParameter = _node.getId();
setParentEdge(_hasParameter);
}
@Override
public void setBlock(int _id) {
if (_hasBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasBlock" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkBlock) {
_hasBlock = _id;
setParentEdge(_hasBlock);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setBlock(Block _node) {
if (_hasBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasBlock" ));
_hasBlock = _node.getId();
setParentEdge(_hasBlock);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(((Range)leftParenPosition).getPathKey());
io.writeInt4(((Range)leftParenPosition).getLine());
io.writeInt4(((Range)leftParenPosition).getCol());
io.writeInt4(((Range)leftParenPosition).getEndLine());
io.writeInt4(((Range)leftParenPosition).getEndCol());
io.writeInt4(((Range)leftParenPosition).getWideLine());
io.writeInt4(((Range)leftParenPosition).getWideCol());
io.writeInt4(((Range)leftParenPosition).getWideEndLine());
io.writeInt4(((Range)leftParenPosition).getWideEndCol());
io.writeInt4(((Range)rightParenPosition).getPathKey());
io.writeInt4(((Range)rightParenPosition).getLine());
io.writeInt4(((Range)rightParenPosition).getCol());
io.writeInt4(((Range)rightParenPosition).getEndLine());
io.writeInt4(((Range)rightParenPosition).getEndCol());
io.writeInt4(((Range)rightParenPosition).getWideLine());
io.writeInt4(((Range)rightParenPosition).getWideCol());
io.writeInt4(((Range)rightParenPosition).getWideEndLine());
io.writeInt4(((Range)rightParenPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasParameter) ? _hasParameter : 0);
io.writeInt4(!factory.getIsFiltered(_hasBlock) ? _hasBlock : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
((Range)leftParenPosition).setPathKey(io.readInt4());
((Range)leftParenPosition).setLine(io.readInt4());
((Range)leftParenPosition).setCol(io.readInt4());
((Range)leftParenPosition).setEndLine(io.readInt4());
((Range)leftParenPosition).setEndCol(io.readInt4());
((Range)leftParenPosition).setWideLine(io.readInt4());
((Range)leftParenPosition).setWideCol(io.readInt4());
((Range)leftParenPosition).setWideEndLine(io.readInt4());
((Range)leftParenPosition).setWideEndCol(io.readInt4());
((Range)rightParenPosition).setPathKey(io.readInt4());
((Range)rightParenPosition).setLine(io.readInt4());
((Range)rightParenPosition).setCol(io.readInt4());
((Range)rightParenPosition).setEndLine(io.readInt4());
((Range)rightParenPosition).setEndCol(io.readInt4());
((Range)rightParenPosition).setWideLine(io.readInt4());
((Range)rightParenPosition).setWideCol(io.readInt4());
((Range)rightParenPosition).setWideEndLine(io.readInt4());
((Range)rightParenPosition).setWideEndCol(io.readInt4());
_hasParameter = io.readInt4();
if (_hasParameter != 0)
setParentEdge(_hasParameter);
_hasBlock = io.readInt4();
if (_hasBlock != 0)
setParentEdge(_hasBlock);
}
}
| 10,962 | 27.549479 | 129 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Case.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.expr.Expression;
/**
* Interface Case, which represents the {@link columbus.java.asg.statm.Case Case} node.
* @columbus.node (missing)
* @columbus.edge hasExpression ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Case extends SwitchLabel {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Case#edgeHasExpression hasExpression} edge points to.
* @return Returns the end point of the hasExpression edge.
*/
public Expression getExpression();
/**
* Sets the {@link columbus.java.asg.statm.Case#edgeHasExpression hasExpression} edge.
* @param id The new end point of the hasExpression edge.
*/
public void setExpression(int id);
/**
* Sets the {@link columbus.java.asg.statm.Case#edgeHasExpression hasExpression} edge.
* @param node The new end point of the hasExpression edge.
*/
public void setExpression(Expression node);
}
| 1,724 | 32.173077 | 129 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/BlockImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Block Block} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class BlockImpl extends BaseImpl implements Block {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(BlockImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected EdgeList<Statement> _hasStatements;
public BlockImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkBlock;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public EdgeIterator<Statement> getStatementsIterator() {
if (_hasStatements == null)
return EdgeList.<Statement>emptyList().iterator();
else
return _hasStatements.iterator();
}
@Override
public boolean getStatementsIsEmpty() {
if (_hasStatements == null)
return true;
else
return _hasStatements.isEmpty();
}
@Override
public int getStatementsSize() {
if (_hasStatements == null)
return 0;
else
return _hasStatements.size();
}
@Override
public void addStatements(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
if (_hasStatements == null)
_hasStatements = new EdgeList<Statement>(factory);
_hasStatements.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addStatements(Statement _node) {
if (_hasStatements == null)
_hasStatements = new EdgeList<Statement>(factory);
_hasStatements.add(_node);
setParentEdge(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
if (_hasStatements != null) {
EdgeIterator<Statement> it = getStatementsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_id = io.readInt4();
if (_id != 0) {
_hasStatements = new EdgeList<Statement>(factory);
while (_id != 0) {
_hasStatements.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 7,209 | 23.440678 | 127 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Try.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
import columbus.java.asg.base.Base;
/**
* Interface Try, which represents the {@link columbus.java.asg.statm.Try Try} node.
* @columbus.node (missing)
* @columbus.attr resourceLeftParenPosition (Range) : (missing)
* @columbus.attr resourceRightParenPosition (Range) : (missing)
* @columbus.attr finallyPosition (Range) : (missing)
* @columbus.edge hasResources ({@link columbus.java.asg.base.Base Base}, multiple) : (missing)
* @columbus.edge hasBlock ({@link columbus.java.asg.statm.Block Block}, single) : (missing)
* @columbus.edge hasHandlers ({@link columbus.java.asg.statm.Handler Handler}, multiple) : (missing)
* @columbus.edge hasFinallyBlock ({@link columbus.java.asg.statm.Block Block}, single) : (missing)
*/
public interface Try extends Statement {
/**
* Gives back the {@link columbus.java.asg.statm.Try#attributeResourceLeftParenPosition resourceLeftParenPosition} of the node.
* @return Returns with the resourceLeftParenPosition.
*/
public Range getResourceLeftParenPosition();
/**
* Sets the {@link columbus.java.asg.statm.Try#attributeResourceLeftParenPosition resourceLeftParenPosition} of the node.
* @param value The new value of the resourceLeftParenPosition.
*/
public void setResourceLeftParenPosition(Range value);
/**
* Gives back the {@link columbus.java.asg.statm.Try#attributeResourceRightParenPosition resourceRightParenPosition} of the node.
* @return Returns with the resourceRightParenPosition.
*/
public Range getResourceRightParenPosition();
/**
* Sets the {@link columbus.java.asg.statm.Try#attributeResourceRightParenPosition resourceRightParenPosition} of the node.
* @param value The new value of the resourceRightParenPosition.
*/
public void setResourceRightParenPosition(Range value);
/**
* Gives back the {@link columbus.java.asg.statm.Try#attributeFinallyPosition finallyPosition} of the node.
* @return Returns with the finallyPosition.
*/
public Range getFinallyPosition();
/**
* Sets the {@link columbus.java.asg.statm.Try#attributeFinallyPosition finallyPosition} of the node.
* @param value The new value of the finallyPosition.
*/
public void setFinallyPosition(Range value);
/**
* Gives back iterator for the {@link columbus.java.asg.statm.Try#edgeHasResources hasResources} edges.
* @return Returns an iterator for the hasResources edges.
*/
public EdgeIterator<Base> getResourcesIterator();
/**
* Tells whether the node has {@link columbus.java.asg.statm.Try#edgeHasResources hasResources} edges or not.
* @return Returns true if the node doesn't have any hasResources edge.
*/
public boolean getResourcesIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.statm.Try#edgeHasResources hasResources} edges the node has.
* @return Returns with the number of hasResources edges.
*/
public int getResourcesSize();
/**
* Adds a new {@link columbus.java.asg.statm.Try#edgeHasResources hasResources} edge to the node.
* @param id The end point of the new hasResources edge.
*/
public void addResources(int id);
/**
* Adds a new {@link columbus.java.asg.statm.Try#edgeHasResources hasResources} edge to the node.
* @param node The end point of the new hasResources edge.
*/
public void addResources(Base node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Try#edgeHasBlock hasBlock} edge points to.
* @return Returns the end point of the hasBlock edge.
*/
public Block getBlock();
/**
* Sets the {@link columbus.java.asg.statm.Try#edgeHasBlock hasBlock} edge.
* @param id The new end point of the hasBlock edge.
*/
public void setBlock(int id);
/**
* Sets the {@link columbus.java.asg.statm.Try#edgeHasBlock hasBlock} edge.
* @param node The new end point of the hasBlock edge.
*/
public void setBlock(Block node);
/**
* Gives back iterator for the {@link columbus.java.asg.statm.Try#edgeHasHandlers hasHandlers} edges.
* @return Returns an iterator for the hasHandlers edges.
*/
public EdgeIterator<Handler> getHandlersIterator();
/**
* Tells whether the node has {@link columbus.java.asg.statm.Try#edgeHasHandlers hasHandlers} edges or not.
* @return Returns true if the node doesn't have any hasHandlers edge.
*/
public boolean getHandlersIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.statm.Try#edgeHasHandlers hasHandlers} edges the node has.
* @return Returns with the number of hasHandlers edges.
*/
public int getHandlersSize();
/**
* Adds a new {@link columbus.java.asg.statm.Try#edgeHasHandlers hasHandlers} edge to the node.
* @param id The end point of the new hasHandlers edge.
*/
public void addHandlers(int id);
/**
* Adds a new {@link columbus.java.asg.statm.Try#edgeHasHandlers hasHandlers} edge to the node.
* @param node The end point of the new hasHandlers edge.
*/
public void addHandlers(Handler node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Try#edgeHasFinallyBlock hasFinallyBlock} edge points to.
* @return Returns the end point of the hasFinallyBlock edge.
*/
public Block getFinallyBlock();
/**
* Sets the {@link columbus.java.asg.statm.Try#edgeHasFinallyBlock hasFinallyBlock} edge.
* @param id The new end point of the hasFinallyBlock edge.
*/
public void setFinallyBlock(int id);
/**
* Sets the {@link columbus.java.asg.statm.Try#edgeHasFinallyBlock hasFinallyBlock} edge.
* @param node The new end point of the hasFinallyBlock edge.
*/
public void setFinallyBlock(Block node);
}
| 6,355 | 35.739884 | 132 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/DefaultImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Default Default} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class DefaultImpl extends BaseImpl implements Default {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(DefaultImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected Object colonPosition;
protected EdgeList<Statement> _hasStatements;
public DefaultImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
colonPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkDefault;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getColonPosition() {
return (Range)colonPosition;
}
@Override
public void setColonPosition(Range _colonPosition) {
if (factory.getStringTable() == _colonPosition.getStringTable())
colonPosition = _colonPosition;
else
colonPosition = new Range(factory.getStringTable(), _colonPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public EdgeIterator<Statement> getStatementsIterator() {
if (_hasStatements == null)
return EdgeList.<Statement>emptyList().iterator();
else
return _hasStatements.iterator();
}
@Override
public boolean getStatementsIsEmpty() {
if (_hasStatements == null)
return true;
else
return _hasStatements.isEmpty();
}
@Override
public int getStatementsSize() {
if (_hasStatements == null)
return 0;
else
return _hasStatements.size();
}
@Override
public void addStatements(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
if (_hasStatements == null)
_hasStatements = new EdgeList<Statement>(factory);
_hasStatements.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addStatements(Statement _node) {
if (_hasStatements == null)
_hasStatements = new EdgeList<Statement>(factory);
_hasStatements.add(_node);
setParentEdge(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(((Range)colonPosition).getPathKey());
io.writeInt4(((Range)colonPosition).getLine());
io.writeInt4(((Range)colonPosition).getCol());
io.writeInt4(((Range)colonPosition).getEndLine());
io.writeInt4(((Range)colonPosition).getEndCol());
io.writeInt4(((Range)colonPosition).getWideLine());
io.writeInt4(((Range)colonPosition).getWideCol());
io.writeInt4(((Range)colonPosition).getWideEndLine());
io.writeInt4(((Range)colonPosition).getWideEndCol());
if (_hasStatements != null) {
EdgeIterator<Statement> it = getStatementsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
((Range)colonPosition).setPathKey(io.readInt4());
((Range)colonPosition).setLine(io.readInt4());
((Range)colonPosition).setCol(io.readInt4());
((Range)colonPosition).setEndLine(io.readInt4());
((Range)colonPosition).setEndCol(io.readInt4());
((Range)colonPosition).setWideLine(io.readInt4());
((Range)colonPosition).setWideCol(io.readInt4());
((Range)colonPosition).setWideEndLine(io.readInt4());
((Range)colonPosition).setWideEndCol(io.readInt4());
_id = io.readInt4();
if (_id != 0) {
_hasStatements = new EdgeList<Statement>(factory);
while (_id != 0) {
_hasStatements.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 8,590 | 24.954683 | 129 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Continue.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
/**
* Interface Continue, which represents the {@link columbus.java.asg.statm.Continue Continue} node.
* @columbus.node (missing)
*/
public interface Continue extends Jump {
}
| 947 | 28.625 | 99 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/BasicFor.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
import columbus.java.asg.expr.Expression;
/**
* Interface BasicFor, which represents the {@link columbus.java.asg.statm.BasicFor BasicFor} node.
* @columbus.node (missing)
* @columbus.attr firstSemiPosition (Range) : (missing)
* @columbus.attr secondSemiPosition (Range) : (missing)
* @columbus.edge hasInitializers ({@link columbus.java.asg.statm.Statement Statement}, multiple) : (missing)
* @columbus.edge hasCondition ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
* @columbus.edge hasUpdates ({@link columbus.java.asg.statm.Statement Statement}, multiple) : (missing)
*/
public interface BasicFor extends For {
/**
* Gives back the {@link columbus.java.asg.statm.BasicFor#attributeFirstSemiPosition firstSemiPosition} of the node.
* @return Returns with the firstSemiPosition.
*/
public Range getFirstSemiPosition();
/**
* Sets the {@link columbus.java.asg.statm.BasicFor#attributeFirstSemiPosition firstSemiPosition} of the node.
* @param value The new value of the firstSemiPosition.
*/
public void setFirstSemiPosition(Range value);
/**
* Gives back the {@link columbus.java.asg.statm.BasicFor#attributeSecondSemiPosition secondSemiPosition} of the node.
* @return Returns with the secondSemiPosition.
*/
public Range getSecondSemiPosition();
/**
* Sets the {@link columbus.java.asg.statm.BasicFor#attributeSecondSemiPosition secondSemiPosition} of the node.
* @param value The new value of the secondSemiPosition.
*/
public void setSecondSemiPosition(Range value);
/**
* Gives back iterator for the {@link columbus.java.asg.statm.BasicFor#edgeHasInitializers hasInitializers} edges.
* @return Returns an iterator for the hasInitializers edges.
*/
public EdgeIterator<Statement> getInitializersIterator();
/**
* Tells whether the node has {@link columbus.java.asg.statm.BasicFor#edgeHasInitializers hasInitializers} edges or not.
* @return Returns true if the node doesn't have any hasInitializers edge.
*/
public boolean getInitializersIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.statm.BasicFor#edgeHasInitializers hasInitializers} edges the node has.
* @return Returns with the number of hasInitializers edges.
*/
public int getInitializersSize();
/**
* Adds a new {@link columbus.java.asg.statm.BasicFor#edgeHasInitializers hasInitializers} edge to the node.
* @param id The end point of the new hasInitializers edge.
*/
public void addInitializers(int id);
/**
* Adds a new {@link columbus.java.asg.statm.BasicFor#edgeHasInitializers hasInitializers} edge to the node.
* @param node The end point of the new hasInitializers edge.
*/
public void addInitializers(Statement node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.BasicFor#edgeHasCondition hasCondition} edge points to.
* @return Returns the end point of the hasCondition edge.
*/
public Expression getCondition();
/**
* Sets the {@link columbus.java.asg.statm.BasicFor#edgeHasCondition hasCondition} edge.
* @param id The new end point of the hasCondition edge.
*/
public void setCondition(int id);
/**
* Sets the {@link columbus.java.asg.statm.BasicFor#edgeHasCondition hasCondition} edge.
* @param node The new end point of the hasCondition edge.
*/
public void setCondition(Expression node);
/**
* Gives back iterator for the {@link columbus.java.asg.statm.BasicFor#edgeHasUpdates hasUpdates} edges.
* @return Returns an iterator for the hasUpdates edges.
*/
public EdgeIterator<Statement> getUpdatesIterator();
/**
* Tells whether the node has {@link columbus.java.asg.statm.BasicFor#edgeHasUpdates hasUpdates} edges or not.
* @return Returns true if the node doesn't have any hasUpdates edge.
*/
public boolean getUpdatesIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.statm.BasicFor#edgeHasUpdates hasUpdates} edges the node has.
* @return Returns with the number of hasUpdates edges.
*/
public int getUpdatesSize();
/**
* Adds a new {@link columbus.java.asg.statm.BasicFor#edgeHasUpdates hasUpdates} edge to the node.
* @param id The end point of the new hasUpdates edge.
*/
public void addUpdates(int id);
/**
* Adds a new {@link columbus.java.asg.statm.BasicFor#edgeHasUpdates hasUpdates} edge to the node.
* @param node The end point of the new hasUpdates edge.
*/
public void addUpdates(Statement node);
}
| 5,239 | 36.163121 | 131 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/EmptyImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Empty Empty} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class EmptyImpl extends BaseImpl implements Empty {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(EmptyImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
public EmptyImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkEmpty;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
}
}
| 5,562 | 23.615044 | 127 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/If.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
/**
* Interface If, which represents the {@link columbus.java.asg.statm.If If} node.
* @columbus.node (missing)
* @columbus.attr elsePosition (Range) : (missing)
* @columbus.edge hasSubstatement ({@link columbus.java.asg.statm.Statement Statement}, single) : (missing)
* @columbus.edge hasFalseSubstatement ({@link columbus.java.asg.statm.Statement Statement}, single) : (missing)
*/
public interface If extends Selection {
/**
* Gives back the {@link columbus.java.asg.statm.If#attributeElsePosition elsePosition} of the node.
* @return Returns with the elsePosition.
*/
public Range getElsePosition();
/**
* Sets the {@link columbus.java.asg.statm.If#attributeElsePosition elsePosition} of the node.
* @param value The new value of the elsePosition.
*/
public void setElsePosition(Range value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.If#edgeHasSubstatement hasSubstatement} edge points to.
* @return Returns the end point of the hasSubstatement edge.
*/
public Statement getSubstatement();
/**
* Sets the {@link columbus.java.asg.statm.If#edgeHasSubstatement hasSubstatement} edge.
* @param id The new end point of the hasSubstatement edge.
*/
public void setSubstatement(int id);
/**
* Sets the {@link columbus.java.asg.statm.If#edgeHasSubstatement hasSubstatement} edge.
* @param node The new end point of the hasSubstatement edge.
*/
public void setSubstatement(Statement node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.If#edgeHasFalseSubstatement hasFalseSubstatement} edge points to.
* @return Returns the end point of the hasFalseSubstatement edge.
*/
public Statement getFalseSubstatement();
/**
* Sets the {@link columbus.java.asg.statm.If#edgeHasFalseSubstatement hasFalseSubstatement} edge.
* @param id The new end point of the hasFalseSubstatement edge.
*/
public void setFalseSubstatement(int id);
/**
* Sets the {@link columbus.java.asg.statm.If#edgeHasFalseSubstatement hasFalseSubstatement} edge.
* @param node The new end point of the hasFalseSubstatement edge.
*/
public void setFalseSubstatement(Statement node);
}
| 2,985 | 34.547619 | 141 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/For.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
/**
* Interface For, which represents the {@link columbus.java.asg.statm.For For} node.
* @columbus.node (missing)
* @columbus.attr leftParenPosition (Range) : (missing)
* @columbus.attr rightParenPosition (Range) : (missing)
*/
public interface For extends Iteration {
/**
* Gives back the {@link columbus.java.asg.statm.For#attributeLeftParenPosition leftParenPosition} of the node.
* @return Returns with the leftParenPosition.
*/
public Range getLeftParenPosition();
/**
* Sets the {@link columbus.java.asg.statm.For#attributeLeftParenPosition leftParenPosition} of the node.
* @param value The new value of the leftParenPosition.
*/
public void setLeftParenPosition(Range value);
/**
* Gives back the {@link columbus.java.asg.statm.For#attributeRightParenPosition rightParenPosition} of the node.
* @return Returns with the rightParenPosition.
*/
public Range getRightParenPosition();
/**
* Sets the {@link columbus.java.asg.statm.For#attributeRightParenPosition rightParenPosition} of the node.
* @param value The new value of the rightParenPosition.
*/
public void setRightParenPosition(Range value);
}
| 1,947 | 32.016949 | 114 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/BasicForImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.BasicFor BasicFor} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class BasicForImpl extends BaseImpl implements BasicFor {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(BasicForImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasSubstatement;
protected Object leftParenPosition;
protected Object rightParenPosition;
protected Object firstSemiPosition;
protected Object secondSemiPosition;
protected EdgeList<Statement> _hasInitializers;
protected int _hasCondition;
protected EdgeList<Statement> _hasUpdates;
public BasicForImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
leftParenPosition = new Range(factory.getStringTable());
rightParenPosition = new Range(factory.getStringTable());
firstSemiPosition = new Range(factory.getStringTable());
secondSemiPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkBasicFor;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getLeftParenPosition() {
return (Range)leftParenPosition;
}
@Override
public Range getRightParenPosition() {
return (Range)rightParenPosition;
}
@Override
public void setLeftParenPosition(Range _leftParenPosition) {
if (factory.getStringTable() == _leftParenPosition.getStringTable())
leftParenPosition = _leftParenPosition;
else
leftParenPosition = new Range(factory.getStringTable(), _leftParenPosition);
}
@Override
public void setRightParenPosition(Range _rightParenPosition) {
if (factory.getStringTable() == _rightParenPosition.getStringTable())
rightParenPosition = _rightParenPosition;
else
rightParenPosition = new Range(factory.getStringTable(), _rightParenPosition);
}
@Override
public Range getFirstSemiPosition() {
return (Range)firstSemiPosition;
}
@Override
public Range getSecondSemiPosition() {
return (Range)secondSemiPosition;
}
@Override
public void setFirstSemiPosition(Range _firstSemiPosition) {
if (factory.getStringTable() == _firstSemiPosition.getStringTable())
firstSemiPosition = _firstSemiPosition;
else
firstSemiPosition = new Range(factory.getStringTable(), _firstSemiPosition);
}
@Override
public void setSecondSemiPosition(Range _secondSemiPosition) {
if (factory.getStringTable() == _secondSemiPosition.getStringTable())
secondSemiPosition = _secondSemiPosition;
else
secondSemiPosition = new Range(factory.getStringTable(), _secondSemiPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Statement getSubstatement() {
if (_hasSubstatement == 0)
return null;
if (factory.getIsFiltered(_hasSubstatement))
return null;
return (Statement)factory.getRef(_hasSubstatement);
}
@Override
public void setSubstatement(int _id) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_hasSubstatement = _id;
setParentEdge(_hasSubstatement);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setSubstatement(Statement _node) {
if (_hasSubstatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasSubstatement" ));
_hasSubstatement = _node.getId();
setParentEdge(_hasSubstatement);
}
@Override
public EdgeIterator<Statement> getInitializersIterator() {
if (_hasInitializers == null)
return EdgeList.<Statement>emptyList().iterator();
else
return _hasInitializers.iterator();
}
@Override
public boolean getInitializersIsEmpty() {
if (_hasInitializers == null)
return true;
else
return _hasInitializers.isEmpty();
}
@Override
public int getInitializersSize() {
if (_hasInitializers == null)
return 0;
else
return _hasInitializers.size();
}
@Override
public Expression getCondition() {
if (_hasCondition == 0)
return null;
if (factory.getIsFiltered(_hasCondition))
return null;
return (Expression)factory.getRef(_hasCondition);
}
@Override
public EdgeIterator<Statement> getUpdatesIterator() {
if (_hasUpdates == null)
return EdgeList.<Statement>emptyList().iterator();
else
return _hasUpdates.iterator();
}
@Override
public boolean getUpdatesIsEmpty() {
if (_hasUpdates == null)
return true;
else
return _hasUpdates.isEmpty();
}
@Override
public int getUpdatesSize() {
if (_hasUpdates == null)
return 0;
else
return _hasUpdates.size();
}
@Override
public void addInitializers(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
if (_hasInitializers == null)
_hasInitializers = new EdgeList<Statement>(factory);
_hasInitializers.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addInitializers(Statement _node) {
if (_hasInitializers == null)
_hasInitializers = new EdgeList<Statement>(factory);
_hasInitializers.add(_node);
setParentEdge(_node);
}
@Override
public void setCondition(int _id) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasCondition = _id;
setParentEdge(_hasCondition);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setCondition(Expression _node) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
_hasCondition = _node.getId();
setParentEdge(_hasCondition);
}
@Override
public void addUpdates(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
if (_hasUpdates == null)
_hasUpdates = new EdgeList<Statement>(factory);
_hasUpdates.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addUpdates(Statement _node) {
if (_hasUpdates == null)
_hasUpdates = new EdgeList<Statement>(factory);
_hasUpdates.add(_node);
setParentEdge(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasSubstatement) ? _hasSubstatement : 0);
io.writeInt4(((Range)leftParenPosition).getPathKey());
io.writeInt4(((Range)leftParenPosition).getLine());
io.writeInt4(((Range)leftParenPosition).getCol());
io.writeInt4(((Range)leftParenPosition).getEndLine());
io.writeInt4(((Range)leftParenPosition).getEndCol());
io.writeInt4(((Range)leftParenPosition).getWideLine());
io.writeInt4(((Range)leftParenPosition).getWideCol());
io.writeInt4(((Range)leftParenPosition).getWideEndLine());
io.writeInt4(((Range)leftParenPosition).getWideEndCol());
io.writeInt4(((Range)rightParenPosition).getPathKey());
io.writeInt4(((Range)rightParenPosition).getLine());
io.writeInt4(((Range)rightParenPosition).getCol());
io.writeInt4(((Range)rightParenPosition).getEndLine());
io.writeInt4(((Range)rightParenPosition).getEndCol());
io.writeInt4(((Range)rightParenPosition).getWideLine());
io.writeInt4(((Range)rightParenPosition).getWideCol());
io.writeInt4(((Range)rightParenPosition).getWideEndLine());
io.writeInt4(((Range)rightParenPosition).getWideEndCol());
io.writeInt4(((Range)firstSemiPosition).getPathKey());
io.writeInt4(((Range)firstSemiPosition).getLine());
io.writeInt4(((Range)firstSemiPosition).getCol());
io.writeInt4(((Range)firstSemiPosition).getEndLine());
io.writeInt4(((Range)firstSemiPosition).getEndCol());
io.writeInt4(((Range)firstSemiPosition).getWideLine());
io.writeInt4(((Range)firstSemiPosition).getWideCol());
io.writeInt4(((Range)firstSemiPosition).getWideEndLine());
io.writeInt4(((Range)firstSemiPosition).getWideEndCol());
io.writeInt4(((Range)secondSemiPosition).getPathKey());
io.writeInt4(((Range)secondSemiPosition).getLine());
io.writeInt4(((Range)secondSemiPosition).getCol());
io.writeInt4(((Range)secondSemiPosition).getEndLine());
io.writeInt4(((Range)secondSemiPosition).getEndCol());
io.writeInt4(((Range)secondSemiPosition).getWideLine());
io.writeInt4(((Range)secondSemiPosition).getWideCol());
io.writeInt4(((Range)secondSemiPosition).getWideEndLine());
io.writeInt4(((Range)secondSemiPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasCondition) ? _hasCondition : 0);
if (_hasInitializers != null) {
EdgeIterator<Statement> it = getInitializersIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
if (_hasUpdates != null) {
EdgeIterator<Statement> it = getUpdatesIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasSubstatement = io.readInt4();
if (_hasSubstatement != 0)
setParentEdge(_hasSubstatement);
((Range)leftParenPosition).setPathKey(io.readInt4());
((Range)leftParenPosition).setLine(io.readInt4());
((Range)leftParenPosition).setCol(io.readInt4());
((Range)leftParenPosition).setEndLine(io.readInt4());
((Range)leftParenPosition).setEndCol(io.readInt4());
((Range)leftParenPosition).setWideLine(io.readInt4());
((Range)leftParenPosition).setWideCol(io.readInt4());
((Range)leftParenPosition).setWideEndLine(io.readInt4());
((Range)leftParenPosition).setWideEndCol(io.readInt4());
((Range)rightParenPosition).setPathKey(io.readInt4());
((Range)rightParenPosition).setLine(io.readInt4());
((Range)rightParenPosition).setCol(io.readInt4());
((Range)rightParenPosition).setEndLine(io.readInt4());
((Range)rightParenPosition).setEndCol(io.readInt4());
((Range)rightParenPosition).setWideLine(io.readInt4());
((Range)rightParenPosition).setWideCol(io.readInt4());
((Range)rightParenPosition).setWideEndLine(io.readInt4());
((Range)rightParenPosition).setWideEndCol(io.readInt4());
((Range)firstSemiPosition).setPathKey(io.readInt4());
((Range)firstSemiPosition).setLine(io.readInt4());
((Range)firstSemiPosition).setCol(io.readInt4());
((Range)firstSemiPosition).setEndLine(io.readInt4());
((Range)firstSemiPosition).setEndCol(io.readInt4());
((Range)firstSemiPosition).setWideLine(io.readInt4());
((Range)firstSemiPosition).setWideCol(io.readInt4());
((Range)firstSemiPosition).setWideEndLine(io.readInt4());
((Range)firstSemiPosition).setWideEndCol(io.readInt4());
((Range)secondSemiPosition).setPathKey(io.readInt4());
((Range)secondSemiPosition).setLine(io.readInt4());
((Range)secondSemiPosition).setCol(io.readInt4());
((Range)secondSemiPosition).setEndLine(io.readInt4());
((Range)secondSemiPosition).setEndCol(io.readInt4());
((Range)secondSemiPosition).setWideLine(io.readInt4());
((Range)secondSemiPosition).setWideCol(io.readInt4());
((Range)secondSemiPosition).setWideEndLine(io.readInt4());
((Range)secondSemiPosition).setWideEndCol(io.readInt4());
_hasCondition = io.readInt4();
if (_hasCondition != 0)
setParentEdge(_hasCondition);
_id = io.readInt4();
if (_id != 0) {
_hasInitializers = new EdgeList<Statement>(factory);
while (_id != 0) {
_hasInitializers.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
_id = io.readInt4();
if (_id != 0) {
_hasUpdates = new EdgeList<Statement>(factory);
while (_id != 0) {
_hasUpdates.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 17,444 | 28.467905 | 130 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/AssertImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Assert Assert} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class AssertImpl extends BaseImpl implements Assert {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(AssertImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected Object colonPosition;
protected int _hasCondition;
protected int _hasDetail;
public AssertImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
colonPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkAssert;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getColonPosition() {
return (Range)colonPosition;
}
@Override
public void setColonPosition(Range _colonPosition) {
if (factory.getStringTable() == _colonPosition.getStringTable())
colonPosition = _colonPosition;
else
colonPosition = new Range(factory.getStringTable(), _colonPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getCondition() {
if (_hasCondition == 0)
return null;
if (factory.getIsFiltered(_hasCondition))
return null;
return (Expression)factory.getRef(_hasCondition);
}
@Override
public Expression getDetail() {
if (_hasDetail == 0)
return null;
if (factory.getIsFiltered(_hasDetail))
return null;
return (Expression)factory.getRef(_hasDetail);
}
@Override
public void setCondition(int _id) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasCondition = _id;
setParentEdge(_hasCondition);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setCondition(Expression _node) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
_hasCondition = _node.getId();
setParentEdge(_hasCondition);
}
@Override
public void setDetail(int _id) {
if (_hasDetail != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasDetail" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasDetail = _id;
setParentEdge(_hasDetail);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setDetail(Expression _node) {
if (_hasDetail != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasDetail" ));
_hasDetail = _node.getId();
setParentEdge(_hasDetail);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(((Range)colonPosition).getPathKey());
io.writeInt4(((Range)colonPosition).getLine());
io.writeInt4(((Range)colonPosition).getCol());
io.writeInt4(((Range)colonPosition).getEndLine());
io.writeInt4(((Range)colonPosition).getEndCol());
io.writeInt4(((Range)colonPosition).getWideLine());
io.writeInt4(((Range)colonPosition).getWideCol());
io.writeInt4(((Range)colonPosition).getWideEndLine());
io.writeInt4(((Range)colonPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasCondition) ? _hasCondition : 0);
io.writeInt4(!factory.getIsFiltered(_hasDetail) ? _hasDetail : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
((Range)colonPosition).setPathKey(io.readInt4());
((Range)colonPosition).setLine(io.readInt4());
((Range)colonPosition).setCol(io.readInt4());
((Range)colonPosition).setEndLine(io.readInt4());
((Range)colonPosition).setEndCol(io.readInt4());
((Range)colonPosition).setWideLine(io.readInt4());
((Range)colonPosition).setWideCol(io.readInt4());
((Range)colonPosition).setWideEndLine(io.readInt4());
((Range)colonPosition).setWideEndCol(io.readInt4());
_hasCondition = io.readInt4();
if (_hasCondition != 0)
setParentEdge(_hasCondition);
_hasDetail = io.readInt4();
if (_hasDetail != 0)
setParentEdge(_hasDetail);
}
}
| 9,423 | 25.925714 | 128 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Statement.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.base.Positioned;
/**
* Interface Statement, which represents the {@link columbus.java.asg.statm.Statement Statement} node.
* @columbus.node (missing)
*/
public interface Statement extends Positioned {
}
| 999 | 29.30303 | 102 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/SwitchImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Switch Switch} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class SwitchImpl extends BaseImpl implements Switch {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(SwitchImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasCondition;
protected Object blockStartPosition;
protected EdgeList<SwitchLabel> _hasCases;
public SwitchImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
blockStartPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkSwitch;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getBlockStartPosition() {
return (Range)blockStartPosition;
}
@Override
public void setBlockStartPosition(Range _blockStartPosition) {
if (factory.getStringTable() == _blockStartPosition.getStringTable())
blockStartPosition = _blockStartPosition;
else
blockStartPosition = new Range(factory.getStringTable(), _blockStartPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getCondition() {
if (_hasCondition == 0)
return null;
if (factory.getIsFiltered(_hasCondition))
return null;
return (Expression)factory.getRef(_hasCondition);
}
@Override
public void setCondition(int _id) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasCondition = _id;
setParentEdge(_hasCondition);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setCondition(Expression _node) {
if (_hasCondition != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasCondition" ));
_hasCondition = _node.getId();
setParentEdge(_hasCondition);
}
@Override
public EdgeIterator<SwitchLabel> getCasesIterator() {
if (_hasCases == null)
return EdgeList.<SwitchLabel>emptyList().iterator();
else
return _hasCases.iterator();
}
@Override
public boolean getCasesIsEmpty() {
if (_hasCases == null)
return true;
else
return _hasCases.isEmpty();
}
@Override
public int getCasesSize() {
if (_hasCases == null)
return 0;
else
return _hasCases.size();
}
@Override
public void addCases(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkSwitchLabel)) {
if (_hasCases == null)
_hasCases = new EdgeList<SwitchLabel>(factory);
_hasCases.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addCases(SwitchLabel _node) {
if (_hasCases == null)
_hasCases = new EdgeList<SwitchLabel>(factory);
_hasCases.add(_node);
setParentEdge(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasCondition) ? _hasCondition : 0);
io.writeInt4(((Range)blockStartPosition).getPathKey());
io.writeInt4(((Range)blockStartPosition).getLine());
io.writeInt4(((Range)blockStartPosition).getCol());
io.writeInt4(((Range)blockStartPosition).getEndLine());
io.writeInt4(((Range)blockStartPosition).getEndCol());
io.writeInt4(((Range)blockStartPosition).getWideLine());
io.writeInt4(((Range)blockStartPosition).getWideCol());
io.writeInt4(((Range)blockStartPosition).getWideEndLine());
io.writeInt4(((Range)blockStartPosition).getWideEndCol());
if (_hasCases != null) {
EdgeIterator<SwitchLabel> it = getCasesIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasCondition = io.readInt4();
if (_hasCondition != 0)
setParentEdge(_hasCondition);
((Range)blockStartPosition).setPathKey(io.readInt4());
((Range)blockStartPosition).setLine(io.readInt4());
((Range)blockStartPosition).setCol(io.readInt4());
((Range)blockStartPosition).setEndLine(io.readInt4());
((Range)blockStartPosition).setEndCol(io.readInt4());
((Range)blockStartPosition).setWideLine(io.readInt4());
((Range)blockStartPosition).setWideCol(io.readInt4());
((Range)blockStartPosition).setWideEndLine(io.readInt4());
((Range)blockStartPosition).setWideEndCol(io.readInt4());
_id = io.readInt4();
if (_id != 0) {
_hasCases = new EdgeList<SwitchLabel>(factory);
while (_id != 0) {
_hasCases.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 9,931 | 25.414894 | 128 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Jump.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
/**
* Interface Jump, which represents the {@link columbus.java.asg.statm.Jump Jump} node.
* @columbus.node (missing)
* @columbus.attr label (String) : (missing)
* @columbus.attr labelPosition (Range) : (missing)
* @columbus.edge target ({@link columbus.java.asg.statm.Statement Statement}, single) : (missing)
*/
public interface Jump extends Statement {
/**
* Gives back the {@link columbus.java.asg.statm.Jump#attributeLabel label} of the node.
* @return Returns with the label.
*/
public String getLabel();
/**
* Gives back the Key of {@link columbus.java.asg.statm.Jump#attributeLabel label} of the node.
* @return Returns with the Key of the label.
*/
public int getLabelKey();
/**
* Sets the {@link columbus.java.asg.statm.Jump#attributeLabel label} of the node.
* @param value The new value of the label.
*/
public void setLabel(String value);
/**
* Gives back the {@link columbus.java.asg.statm.Jump#attributeLabelPosition labelPosition} of the node.
* @return Returns with the labelPosition.
*/
public Range getLabelPosition();
/**
* Sets the {@link columbus.java.asg.statm.Jump#attributeLabelPosition labelPosition} of the node.
* @param value The new value of the labelPosition.
*/
public void setLabelPosition(Range value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Jump#edgeTarget target} edge points to.
* @return Returns the end point of the target edge.
*/
public Statement getTarget();
/**
* Sets the {@link columbus.java.asg.statm.Jump#edgeTarget target} edge.
* @param id The new end point of the target edge.
*/
public void setTarget(int id);
/**
* Sets the {@link columbus.java.asg.statm.Jump#edgeTarget target} edge.
* @param node The new end point of the target edge.
*/
public void setTarget(Statement node);
}
| 2,646 | 30.511905 | 115 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/LabeledStatementImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.LabeledStatement LabeledStatement} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class LabeledStatementImpl extends BaseImpl implements LabeledStatement {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(LabeledStatementImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int label;
protected Object colonPosition;
protected int _hasStatement;
public LabeledStatementImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
colonPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkLabeledStatement;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public String getLabel() {
return factory.getStringTable().get(label);
}
@Override
public int getLabelKey() {
return label;
}
@Override
public Range getColonPosition() {
return (Range)colonPosition;
}
@Override
public void setLabel(String _label) {
label = factory.getStringTable().set(_label);
}
@Override
public void setColonPosition(Range _colonPosition) {
if (factory.getStringTable() == _colonPosition.getStringTable())
colonPosition = _colonPosition;
else
colonPosition = new Range(factory.getStringTable(), _colonPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Statement getStatement() {
if (_hasStatement == 0)
return null;
if (factory.getIsFiltered(_hasStatement))
return null;
return (Statement)factory.getRef(_hasStatement);
}
@Override
public void setStatement(int _id) {
if (_hasStatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasStatement" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_hasStatement = _id;
setParentEdge(_hasStatement);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setStatement(Statement _node) {
if (_hasStatement != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasStatement" ));
_hasStatement = _node.getId();
setParentEdge(_hasStatement);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(label);
io.writeInt4(((Range)colonPosition).getPathKey());
io.writeInt4(((Range)colonPosition).getLine());
io.writeInt4(((Range)colonPosition).getCol());
io.writeInt4(((Range)colonPosition).getEndLine());
io.writeInt4(((Range)colonPosition).getEndCol());
io.writeInt4(((Range)colonPosition).getWideLine());
io.writeInt4(((Range)colonPosition).getWideCol());
io.writeInt4(((Range)colonPosition).getWideEndLine());
io.writeInt4(((Range)colonPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasStatement) ? _hasStatement : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
label = io.readInt4();
((Range)colonPosition).setPathKey(io.readInt4());
((Range)colonPosition).setLine(io.readInt4());
((Range)colonPosition).setCol(io.readInt4());
((Range)colonPosition).setEndLine(io.readInt4());
((Range)colonPosition).setEndCol(io.readInt4());
((Range)colonPosition).setWideLine(io.readInt4());
((Range)colonPosition).setWideCol(io.readInt4());
((Range)colonPosition).setWideEndLine(io.readInt4());
((Range)colonPosition).setWideEndCol(io.readInt4());
_hasStatement = io.readInt4();
if (_hasStatement != 0)
setParentEdge(_hasStatement);
}
}
| 8,576 | 25.390769 | 138 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/TryImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Try Try} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class TryImpl extends BaseImpl implements Try {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(TryImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected Object resourceLeftParenPosition;
protected Object resourceRightParenPosition;
protected Object finallyPosition;
protected EdgeList<Base> _hasResources;
protected int _hasBlock;
protected EdgeList<Handler> _hasHandlers;
protected int _hasFinallyBlock;
public TryImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
resourceLeftParenPosition = new Range(factory.getStringTable());
resourceRightParenPosition = new Range(factory.getStringTable());
finallyPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkTry;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getResourceLeftParenPosition() {
return (Range)resourceLeftParenPosition;
}
@Override
public Range getResourceRightParenPosition() {
return (Range)resourceRightParenPosition;
}
@Override
public Range getFinallyPosition() {
return (Range)finallyPosition;
}
@Override
public void setResourceLeftParenPosition(Range _resourceLeftParenPosition) {
if (factory.getStringTable() == _resourceLeftParenPosition.getStringTable())
resourceLeftParenPosition = _resourceLeftParenPosition;
else
resourceLeftParenPosition = new Range(factory.getStringTable(), _resourceLeftParenPosition);
}
@Override
public void setResourceRightParenPosition(Range _resourceRightParenPosition) {
if (factory.getStringTable() == _resourceRightParenPosition.getStringTable())
resourceRightParenPosition = _resourceRightParenPosition;
else
resourceRightParenPosition = new Range(factory.getStringTable(), _resourceRightParenPosition);
}
@Override
public void setFinallyPosition(Range _finallyPosition) {
if (factory.getStringTable() == _finallyPosition.getStringTable())
finallyPosition = _finallyPosition;
else
finallyPosition = new Range(factory.getStringTable(), _finallyPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public EdgeIterator<Base> getResourcesIterator() {
if (_hasResources == null)
return EdgeList.<Base>emptyList().iterator();
else
return _hasResources.iterator();
}
@Override
public boolean getResourcesIsEmpty() {
if (_hasResources == null)
return true;
else
return _hasResources.isEmpty();
}
@Override
public int getResourcesSize() {
if (_hasResources == null)
return 0;
else
return _hasResources.size();
}
@Override
public Block getBlock() {
if (_hasBlock == 0)
return null;
if (factory.getIsFiltered(_hasBlock))
return null;
return (Block)factory.getRef(_hasBlock);
}
@Override
public EdgeIterator<Handler> getHandlersIterator() {
if (_hasHandlers == null)
return EdgeList.<Handler>emptyList().iterator();
else
return _hasHandlers.iterator();
}
@Override
public boolean getHandlersIsEmpty() {
if (_hasHandlers == null)
return true;
else
return _hasHandlers.isEmpty();
}
@Override
public int getHandlersSize() {
if (_hasHandlers == null)
return 0;
else
return _hasHandlers.size();
}
@Override
public Block getFinallyBlock() {
if (_hasFinallyBlock == 0)
return null;
if (factory.getIsFiltered(_hasFinallyBlock))
return null;
return (Block)factory.getRef(_hasFinallyBlock);
}
@Override
public void addResources(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkVariable || Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
if (_hasResources == null)
_hasResources = new EdgeList<Base>(factory);
_hasResources.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addResources(Base _node) {
if (_node.getNodeKind() == NodeKind.ndkVariable || Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
if (_hasResources == null)
_hasResources = new EdgeList<Base>(factory);
_hasResources.add(_node);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_node);
}
@Override
public void setBlock(int _id) {
if (_hasBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasBlock" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkBlock) {
_hasBlock = _id;
setParentEdge(_hasBlock);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setBlock(Block _node) {
if (_hasBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasBlock" ));
_hasBlock = _node.getId();
setParentEdge(_hasBlock);
}
@Override
public void addHandlers(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkHandler) {
if (_hasHandlers == null)
_hasHandlers = new EdgeList<Handler>(factory);
_hasHandlers.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addHandlers(Handler _node) {
if (_hasHandlers == null)
_hasHandlers = new EdgeList<Handler>(factory);
_hasHandlers.add(_node);
setParentEdge(_node);
}
@Override
public void setFinallyBlock(int _id) {
if (_hasFinallyBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasFinallyBlock" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (_node.getNodeKind() == NodeKind.ndkBlock) {
_hasFinallyBlock = _id;
setParentEdge(_hasFinallyBlock);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setFinallyBlock(Block _node) {
if (_hasFinallyBlock != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasFinallyBlock" ));
_hasFinallyBlock = _node.getId();
setParentEdge(_hasFinallyBlock);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(((Range)resourceLeftParenPosition).getPathKey());
io.writeInt4(((Range)resourceLeftParenPosition).getLine());
io.writeInt4(((Range)resourceLeftParenPosition).getCol());
io.writeInt4(((Range)resourceLeftParenPosition).getEndLine());
io.writeInt4(((Range)resourceLeftParenPosition).getEndCol());
io.writeInt4(((Range)resourceLeftParenPosition).getWideLine());
io.writeInt4(((Range)resourceLeftParenPosition).getWideCol());
io.writeInt4(((Range)resourceLeftParenPosition).getWideEndLine());
io.writeInt4(((Range)resourceLeftParenPosition).getWideEndCol());
io.writeInt4(((Range)resourceRightParenPosition).getPathKey());
io.writeInt4(((Range)resourceRightParenPosition).getLine());
io.writeInt4(((Range)resourceRightParenPosition).getCol());
io.writeInt4(((Range)resourceRightParenPosition).getEndLine());
io.writeInt4(((Range)resourceRightParenPosition).getEndCol());
io.writeInt4(((Range)resourceRightParenPosition).getWideLine());
io.writeInt4(((Range)resourceRightParenPosition).getWideCol());
io.writeInt4(((Range)resourceRightParenPosition).getWideEndLine());
io.writeInt4(((Range)resourceRightParenPosition).getWideEndCol());
io.writeInt4(((Range)finallyPosition).getPathKey());
io.writeInt4(((Range)finallyPosition).getLine());
io.writeInt4(((Range)finallyPosition).getCol());
io.writeInt4(((Range)finallyPosition).getEndLine());
io.writeInt4(((Range)finallyPosition).getEndCol());
io.writeInt4(((Range)finallyPosition).getWideLine());
io.writeInt4(((Range)finallyPosition).getWideCol());
io.writeInt4(((Range)finallyPosition).getWideEndLine());
io.writeInt4(((Range)finallyPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_hasBlock) ? _hasBlock : 0);
io.writeInt4(!factory.getIsFiltered(_hasFinallyBlock) ? _hasFinallyBlock : 0);
if (_hasResources != null) {
EdgeIterator<Base> it = getResourcesIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
if (_hasHandlers != null) {
EdgeIterator<Handler> it = getHandlersIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
((Range)resourceLeftParenPosition).setPathKey(io.readInt4());
((Range)resourceLeftParenPosition).setLine(io.readInt4());
((Range)resourceLeftParenPosition).setCol(io.readInt4());
((Range)resourceLeftParenPosition).setEndLine(io.readInt4());
((Range)resourceLeftParenPosition).setEndCol(io.readInt4());
((Range)resourceLeftParenPosition).setWideLine(io.readInt4());
((Range)resourceLeftParenPosition).setWideCol(io.readInt4());
((Range)resourceLeftParenPosition).setWideEndLine(io.readInt4());
((Range)resourceLeftParenPosition).setWideEndCol(io.readInt4());
((Range)resourceRightParenPosition).setPathKey(io.readInt4());
((Range)resourceRightParenPosition).setLine(io.readInt4());
((Range)resourceRightParenPosition).setCol(io.readInt4());
((Range)resourceRightParenPosition).setEndLine(io.readInt4());
((Range)resourceRightParenPosition).setEndCol(io.readInt4());
((Range)resourceRightParenPosition).setWideLine(io.readInt4());
((Range)resourceRightParenPosition).setWideCol(io.readInt4());
((Range)resourceRightParenPosition).setWideEndLine(io.readInt4());
((Range)resourceRightParenPosition).setWideEndCol(io.readInt4());
((Range)finallyPosition).setPathKey(io.readInt4());
((Range)finallyPosition).setLine(io.readInt4());
((Range)finallyPosition).setCol(io.readInt4());
((Range)finallyPosition).setEndLine(io.readInt4());
((Range)finallyPosition).setEndCol(io.readInt4());
((Range)finallyPosition).setWideLine(io.readInt4());
((Range)finallyPosition).setWideCol(io.readInt4());
((Range)finallyPosition).setWideEndLine(io.readInt4());
((Range)finallyPosition).setWideEndCol(io.readInt4());
_hasBlock = io.readInt4();
if (_hasBlock != 0)
setParentEdge(_hasBlock);
_hasFinallyBlock = io.readInt4();
if (_hasFinallyBlock != 0)
setParentEdge(_hasFinallyBlock);
_id = io.readInt4();
if (_id != 0) {
_hasResources = new EdgeList<Base>(factory);
while (_id != 0) {
_hasResources.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
_id = io.readInt4();
if (_id != 0) {
_hasHandlers = new EdgeList<Handler>(factory);
while (_id != 0) {
_hasHandlers.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 16,267 | 28.154122 | 126 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/ContinueImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Continue Continue} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class ContinueImpl extends BaseImpl implements Continue {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(ContinueImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int label;
protected Object labelPosition;
protected int _target;
public ContinueImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
labelPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkContinue;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public String getLabel() {
return factory.getStringTable().get(label);
}
@Override
public int getLabelKey() {
return label;
}
@Override
public Range getLabelPosition() {
return (Range)labelPosition;
}
@Override
public void setLabel(String _label) {
label = factory.getStringTable().set(_label);
}
@Override
public void setLabelPosition(Range _labelPosition) {
if (factory.getStringTable() == _labelPosition.getStringTable())
labelPosition = _labelPosition;
else
labelPosition = new Range(factory.getStringTable(), _labelPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Statement getTarget() {
if (_target == 0)
return null;
if (factory.getIsFiltered(_target))
return null;
return (Statement)factory.getRef(_target);
}
@Override
public void setTarget(int _id) {
if (_target != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","target" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_target = _id;
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setTarget(Statement _node) {
if (_target != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","target" ));
_target = _node.getId();
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(label);
io.writeInt4(((Range)labelPosition).getPathKey());
io.writeInt4(((Range)labelPosition).getLine());
io.writeInt4(((Range)labelPosition).getCol());
io.writeInt4(((Range)labelPosition).getEndLine());
io.writeInt4(((Range)labelPosition).getEndCol());
io.writeInt4(((Range)labelPosition).getWideLine());
io.writeInt4(((Range)labelPosition).getWideCol());
io.writeInt4(((Range)labelPosition).getWideEndLine());
io.writeInt4(((Range)labelPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_target) ? _target : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
label = io.readInt4();
((Range)labelPosition).setPathKey(io.readInt4());
((Range)labelPosition).setLine(io.readInt4());
((Range)labelPosition).setCol(io.readInt4());
((Range)labelPosition).setEndLine(io.readInt4());
((Range)labelPosition).setEndCol(io.readInt4());
((Range)labelPosition).setWideLine(io.readInt4());
((Range)labelPosition).setWideCol(io.readInt4());
((Range)labelPosition).setWideEndLine(io.readInt4());
((Range)labelPosition).setWideEndCol(io.readInt4());
_target = io.readInt4();
}
}
| 8,309 | 24.88785 | 130 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Assert.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
import columbus.java.asg.expr.Expression;
/**
* Interface Assert, which represents the {@link columbus.java.asg.statm.Assert Assert} node.
* @columbus.node (missing)
* @columbus.attr colonPosition (Range) : (missing)
* @columbus.edge hasCondition ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
* @columbus.edge hasDetail ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Assert extends Statement {
/**
* Gives back the {@link columbus.java.asg.statm.Assert#attributeColonPosition colonPosition} of the node.
* @return Returns with the colonPosition.
*/
public Range getColonPosition();
/**
* Sets the {@link columbus.java.asg.statm.Assert#attributeColonPosition colonPosition} of the node.
* @param value The new value of the colonPosition.
*/
public void setColonPosition(Range value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Assert#edgeHasCondition hasCondition} edge points to.
* @return Returns the end point of the hasCondition edge.
*/
public Expression getCondition();
/**
* Sets the {@link columbus.java.asg.statm.Assert#edgeHasCondition hasCondition} edge.
* @param id The new end point of the hasCondition edge.
*/
public void setCondition(int id);
/**
* Sets the {@link columbus.java.asg.statm.Assert#edgeHasCondition hasCondition} edge.
* @param node The new end point of the hasCondition edge.
*/
public void setCondition(Expression node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Assert#edgeHasDetail hasDetail} edge points to.
* @return Returns the end point of the hasDetail edge.
*/
public Expression getDetail();
/**
* Sets the {@link columbus.java.asg.statm.Assert#edgeHasDetail hasDetail} edge.
* @param id The new end point of the hasDetail edge.
*/
public void setDetail(int id);
/**
* Sets the {@link columbus.java.asg.statm.Assert#edgeHasDetail hasDetail} edge.
* @param node The new end point of the hasDetail edge.
*/
public void setDetail(Expression node);
}
| 2,908 | 33.223529 | 129 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Handler.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
import columbus.java.asg.struc.Parameter;
import columbus.java.asg.base.Positioned;
/**
* Interface Handler, which represents the {@link columbus.java.asg.statm.Handler Handler} node.
* @columbus.node (missing)
* @columbus.attr leftParenPosition (Range) : (missing)
* @columbus.attr rightParenPosition (Range) : (missing)
* @columbus.edge hasParameter ({@link columbus.java.asg.struc.Parameter Parameter}, single) : (missing)
* @columbus.edge hasBlock ({@link columbus.java.asg.statm.Block Block}, single) : (missing)
*/
public interface Handler extends Positioned {
/**
* Gives back the {@link columbus.java.asg.statm.Handler#attributeLeftParenPosition leftParenPosition} of the node.
* @return Returns with the leftParenPosition.
*/
public Range getLeftParenPosition();
/**
* Sets the {@link columbus.java.asg.statm.Handler#attributeLeftParenPosition leftParenPosition} of the node.
* @param value The new value of the leftParenPosition.
*/
public void setLeftParenPosition(Range value);
/**
* Gives back the {@link columbus.java.asg.statm.Handler#attributeRightParenPosition rightParenPosition} of the node.
* @return Returns with the rightParenPosition.
*/
public Range getRightParenPosition();
/**
* Sets the {@link columbus.java.asg.statm.Handler#attributeRightParenPosition rightParenPosition} of the node.
* @param value The new value of the rightParenPosition.
*/
public void setRightParenPosition(Range value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Handler#edgeHasParameter hasParameter} edge points to.
* @return Returns the end point of the hasParameter edge.
*/
public Parameter getParameter();
/**
* Sets the {@link columbus.java.asg.statm.Handler#edgeHasParameter hasParameter} edge.
* @param id The new end point of the hasParameter edge.
*/
public void setParameter(int id);
/**
* Sets the {@link columbus.java.asg.statm.Handler#edgeHasParameter hasParameter} edge.
* @param node The new end point of the hasParameter edge.
*/
public void setParameter(Parameter node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Handler#edgeHasBlock hasBlock} edge points to.
* @return Returns the end point of the hasBlock edge.
*/
public Block getBlock();
/**
* Sets the {@link columbus.java.asg.statm.Handler#edgeHasBlock hasBlock} edge.
* @param id The new end point of the hasBlock edge.
*/
public void setBlock(int id);
/**
* Sets the {@link columbus.java.asg.statm.Handler#edgeHasBlock hasBlock} edge.
* @param node The new end point of the hasBlock edge.
*/
public void setBlock(Block node);
}
| 3,470 | 34.060606 | 130 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/SwitchLabel.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
import columbus.java.asg.base.Positioned;
/**
* Interface SwitchLabel, which represents the {@link columbus.java.asg.statm.SwitchLabel SwitchLabel} node.
* @columbus.node (missing)
* @columbus.attr colonPosition (Range) : (missing)
* @columbus.edge hasStatements ({@link columbus.java.asg.statm.Statement Statement}, multiple) : (missing)
*/
public interface SwitchLabel extends Positioned {
/**
* Gives back the {@link columbus.java.asg.statm.SwitchLabel#attributeColonPosition colonPosition} of the node.
* @return Returns with the colonPosition.
*/
public Range getColonPosition();
/**
* Sets the {@link columbus.java.asg.statm.SwitchLabel#attributeColonPosition colonPosition} of the node.
* @param value The new value of the colonPosition.
*/
public void setColonPosition(Range value);
/**
* Gives back iterator for the {@link columbus.java.asg.statm.SwitchLabel#edgeHasStatements hasStatements} edges.
* @return Returns an iterator for the hasStatements edges.
*/
public EdgeIterator<Statement> getStatementsIterator();
/**
* Tells whether the node has {@link columbus.java.asg.statm.SwitchLabel#edgeHasStatements hasStatements} edges or not.
* @return Returns true if the node doesn't have any hasStatements edge.
*/
public boolean getStatementsIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.statm.SwitchLabel#edgeHasStatements hasStatements} edges the node has.
* @return Returns with the number of hasStatements edges.
*/
public int getStatementsSize();
/**
* Adds a new {@link columbus.java.asg.statm.SwitchLabel#edgeHasStatements hasStatements} edge to the node.
* @param id The end point of the new hasStatements edge.
*/
public void addStatements(int id);
/**
* Adds a new {@link columbus.java.asg.statm.SwitchLabel#edgeHasStatements hasStatements} edge to the node.
* @param node The end point of the new hasStatements edge.
*/
public void addStatements(Statement node);
}
| 2,766 | 34.474359 | 120 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Empty.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
/**
* Interface Empty, which represents the {@link columbus.java.asg.statm.Empty Empty} node.
* @columbus.node (missing)
*/
public interface Empty extends Statement {
}
| 940 | 28.40625 | 90 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Block.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
/**
* Interface Block, which represents the {@link columbus.java.asg.statm.Block Block} node.
* @columbus.node (missing)
* @columbus.edge hasStatements ({@link columbus.java.asg.statm.Statement Statement}, multiple) : (missing)
*/
public interface Block extends Statement {
/**
* Gives back iterator for the {@link columbus.java.asg.statm.Block#edgeHasStatements hasStatements} edges.
* @return Returns an iterator for the hasStatements edges.
*/
public EdgeIterator<Statement> getStatementsIterator();
/**
* Tells whether the node has {@link columbus.java.asg.statm.Block#edgeHasStatements hasStatements} edges or not.
* @return Returns true if the node doesn't have any hasStatements edge.
*/
public boolean getStatementsIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.statm.Block#edgeHasStatements hasStatements} edges the node has.
* @return Returns with the number of hasStatements edges.
*/
public int getStatementsSize();
/**
* Adds a new {@link columbus.java.asg.statm.Block#edgeHasStatements hasStatements} edge to the node.
* @param id The end point of the new hasStatements edge.
*/
public void addStatements(int id);
/**
* Adds a new {@link columbus.java.asg.statm.Block#edgeHasStatements hasStatements} edge to the node.
* @param node The end point of the new hasStatements edge.
*/
public void addStatements(Statement node);
}
| 2,200 | 33.390625 | 114 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Return.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.expr.Expression;
/**
* Interface Return, which represents the {@link columbus.java.asg.statm.Return Return} node.
* @columbus.node (missing)
* @columbus.edge hasExpression ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Return extends Statement {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Return#edgeHasExpression hasExpression} edge points to.
* @return Returns the end point of the hasExpression edge.
*/
public Expression getExpression();
/**
* Sets the {@link columbus.java.asg.statm.Return#edgeHasExpression hasExpression} edge.
* @param id The new end point of the hasExpression edge.
*/
public void setExpression(int id);
/**
* Sets the {@link columbus.java.asg.statm.Return#edgeHasExpression hasExpression} edge.
* @param node The new end point of the hasExpression edge.
*/
public void setExpression(Expression node);
}
| 1,736 | 32.403846 | 131 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/BreakImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Break Break} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class BreakImpl extends BaseImpl implements Break {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(BreakImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int label;
protected Object labelPosition;
protected int _target;
public BreakImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
labelPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkBreak;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public String getLabel() {
return factory.getStringTable().get(label);
}
@Override
public int getLabelKey() {
return label;
}
@Override
public Range getLabelPosition() {
return (Range)labelPosition;
}
@Override
public void setLabel(String _label) {
label = factory.getStringTable().set(_label);
}
@Override
public void setLabelPosition(Range _labelPosition) {
if (factory.getStringTable() == _labelPosition.getStringTable())
labelPosition = _labelPosition;
else
labelPosition = new Range(factory.getStringTable(), _labelPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Statement getTarget() {
if (_target == 0)
return null;
if (factory.getIsFiltered(_target))
return null;
return (Statement)factory.getRef(_target);
}
@Override
public void setTarget(int _id) {
if (_target != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","target" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
_target = _id;
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setTarget(Statement _node) {
if (_target != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","target" ));
_target = _node.getId();
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(label);
io.writeInt4(((Range)labelPosition).getPathKey());
io.writeInt4(((Range)labelPosition).getLine());
io.writeInt4(((Range)labelPosition).getCol());
io.writeInt4(((Range)labelPosition).getEndLine());
io.writeInt4(((Range)labelPosition).getEndCol());
io.writeInt4(((Range)labelPosition).getWideLine());
io.writeInt4(((Range)labelPosition).getWideCol());
io.writeInt4(((Range)labelPosition).getWideEndLine());
io.writeInt4(((Range)labelPosition).getWideEndCol());
io.writeInt4(!factory.getIsFiltered(_target) ? _target : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
label = io.readInt4();
((Range)labelPosition).setPathKey(io.readInt4());
((Range)labelPosition).setLine(io.readInt4());
((Range)labelPosition).setCol(io.readInt4());
((Range)labelPosition).setEndLine(io.readInt4());
((Range)labelPosition).setEndCol(io.readInt4());
((Range)labelPosition).setWideLine(io.readInt4());
((Range)labelPosition).setWideCol(io.readInt4());
((Range)labelPosition).setWideEndLine(io.readInt4());
((Range)labelPosition).setWideEndCol(io.readInt4());
_target = io.readInt4();
}
}
| 8,288 | 24.82243 | 127 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Synchronized.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.expr.Expression;
/**
* Interface Synchronized, which represents the {@link columbus.java.asg.statm.Synchronized Synchronized} node.
* @columbus.node (missing)
* @columbus.edge hasLock ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
* @columbus.edge hasBlock ({@link columbus.java.asg.statm.Block Block}, single) : (missing)
*/
public interface Synchronized extends Statement {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Synchronized#edgeHasLock hasLock} edge points to.
* @return Returns the end point of the hasLock edge.
*/
public Expression getLock();
/**
* Sets the {@link columbus.java.asg.statm.Synchronized#edgeHasLock hasLock} edge.
* @param id The new end point of the hasLock edge.
*/
public void setLock(int id);
/**
* Sets the {@link columbus.java.asg.statm.Synchronized#edgeHasLock hasLock} edge.
* @param node The new end point of the hasLock edge.
*/
public void setLock(Expression node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Synchronized#edgeHasBlock hasBlock} edge points to.
* @return Returns the end point of the hasBlock edge.
*/
public Block getBlock();
/**
* Sets the {@link columbus.java.asg.statm.Synchronized#edgeHasBlock hasBlock} edge.
* @param id The new end point of the hasBlock edge.
*/
public void setBlock(int id);
/**
* Sets the {@link columbus.java.asg.statm.Synchronized#edgeHasBlock hasBlock} edge.
* @param node The new end point of the hasBlock edge.
*/
public void setBlock(Block node);
}
| 2,384 | 32.591549 | 127 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Selection.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.expr.Expression;
/**
* Interface Selection, which represents the {@link columbus.java.asg.statm.Selection Selection} node.
* @columbus.node (missing)
* @columbus.edge hasCondition ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Selection extends Statement {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Selection#edgeHasCondition hasCondition} edge points to.
* @return Returns the end point of the hasCondition edge.
*/
public Expression getCondition();
/**
* Sets the {@link columbus.java.asg.statm.Selection#edgeHasCondition hasCondition} edge.
* @param id The new end point of the hasCondition edge.
*/
public void setCondition(int id);
/**
* Sets the {@link columbus.java.asg.statm.Selection#edgeHasCondition hasCondition} edge.
* @param node The new end point of the hasCondition edge.
*/
public void setCondition(Expression node);
}
| 1,744 | 32.557692 | 132 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Break.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
/**
* Interface Break, which represents the {@link columbus.java.asg.statm.Break Break} node.
* @columbus.node (missing)
*/
public interface Break extends Jump {
}
| 935 | 28.25 | 90 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/EnhancedFor.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
import columbus.java.asg.struc.Parameter;
import columbus.java.asg.expr.Expression;
/**
* Interface EnhancedFor, which represents the {@link columbus.java.asg.statm.EnhancedFor EnhancedFor} node.
* @columbus.node (missing)
* @columbus.attr colonPosition (Range) : (missing)
* @columbus.edge hasParameter ({@link columbus.java.asg.struc.Parameter Parameter}, single) : (missing)
* @columbus.edge hasExpression ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface EnhancedFor extends For {
/**
* Gives back the {@link columbus.java.asg.statm.EnhancedFor#attributeColonPosition colonPosition} of the node.
* @return Returns with the colonPosition.
*/
public Range getColonPosition();
/**
* Sets the {@link columbus.java.asg.statm.EnhancedFor#attributeColonPosition colonPosition} of the node.
* @param value The new value of the colonPosition.
*/
public void setColonPosition(Range value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.EnhancedFor#edgeHasParameter hasParameter} edge points to.
* @return Returns the end point of the hasParameter edge.
*/
public Parameter getParameter();
/**
* Sets the {@link columbus.java.asg.statm.EnhancedFor#edgeHasParameter hasParameter} edge.
* @param id The new end point of the hasParameter edge.
*/
public void setParameter(int id);
/**
* Sets the {@link columbus.java.asg.statm.EnhancedFor#edgeHasParameter hasParameter} edge.
* @param node The new end point of the hasParameter edge.
*/
public void setParameter(Parameter node);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.EnhancedFor#edgeHasExpression hasExpression} edge points to.
* @return Returns the end point of the hasExpression edge.
*/
public Expression getExpression();
/**
* Sets the {@link columbus.java.asg.statm.EnhancedFor#edgeHasExpression hasExpression} edge.
* @param id The new end point of the hasExpression edge.
*/
public void setExpression(int id);
/**
* Sets the {@link columbus.java.asg.statm.EnhancedFor#edgeHasExpression hasExpression} edge.
* @param node The new end point of the hasExpression edge.
*/
public void setExpression(Expression node);
}
| 3,053 | 34.511628 | 136 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Default.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
/**
* Interface Default, which represents the {@link columbus.java.asg.statm.Default Default} node.
* @columbus.node (missing)
*/
public interface Default extends SwitchLabel {
}
| 950 | 28.71875 | 96 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Do.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
import columbus.java.asg.expr.Expression;
/**
* Interface Do, which represents the {@link columbus.java.asg.statm.Do Do} node.
* @columbus.node (missing)
* @columbus.attr whilePosition (Range) : (missing)
* @columbus.edge hasCondition ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Do extends Iteration {
/**
* Gives back the {@link columbus.java.asg.statm.Do#attributeWhilePosition whilePosition} of the node.
* @return Returns with the whilePosition.
*/
public Range getWhilePosition();
/**
* Sets the {@link columbus.java.asg.statm.Do#attributeWhilePosition whilePosition} of the node.
* @param value The new value of the whilePosition.
*/
public void setWhilePosition(Range value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Do#edgeHasCondition hasCondition} edge points to.
* @return Returns the end point of the hasCondition edge.
*/
public Expression getCondition();
/**
* Sets the {@link columbus.java.asg.statm.Do#edgeHasCondition hasCondition} edge.
* @param id The new end point of the hasCondition edge.
*/
public void setCondition(int id);
/**
* Sets the {@link columbus.java.asg.statm.Do#edgeHasCondition hasCondition} edge.
* @param node The new end point of the hasCondition edge.
*/
public void setCondition(Expression node);
}
| 2,174 | 31.954545 | 125 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/CaseImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.Case Case} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class CaseImpl extends BaseImpl implements Case {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(CaseImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected Object colonPosition;
protected EdgeList<Statement> _hasStatements;
protected int _hasExpression;
public CaseImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
colonPosition = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkCase;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public Range getColonPosition() {
return (Range)colonPosition;
}
@Override
public void setColonPosition(Range _colonPosition) {
if (factory.getStringTable() == _colonPosition.getStringTable())
colonPosition = _colonPosition;
else
colonPosition = new Range(factory.getStringTable(), _colonPosition);
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public EdgeIterator<Statement> getStatementsIterator() {
if (_hasStatements == null)
return EdgeList.<Statement>emptyList().iterator();
else
return _hasStatements.iterator();
}
@Override
public boolean getStatementsIsEmpty() {
if (_hasStatements == null)
return true;
else
return _hasStatements.isEmpty();
}
@Override
public int getStatementsSize() {
if (_hasStatements == null)
return 0;
else
return _hasStatements.size();
}
@Override
public void addStatements(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkStatement)) {
if (_hasStatements == null)
_hasStatements = new EdgeList<Statement>(factory);
_hasStatements.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addStatements(Statement _node) {
if (_hasStatements == null)
_hasStatements = new EdgeList<Statement>(factory);
_hasStatements.add(_node);
setParentEdge(_node);
}
@Override
public Expression getExpression() {
if (_hasExpression == 0)
return null;
if (factory.getIsFiltered(_hasExpression))
return null;
return (Expression)factory.getRef(_hasExpression);
}
@Override
public void setExpression(int _id) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasExpression = _id;
setParentEdge(_hasExpression);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setExpression(Expression _node) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
_hasExpression = _node.getId();
setParentEdge(_hasExpression);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(((Range)colonPosition).getPathKey());
io.writeInt4(((Range)colonPosition).getLine());
io.writeInt4(((Range)colonPosition).getCol());
io.writeInt4(((Range)colonPosition).getEndLine());
io.writeInt4(((Range)colonPosition).getEndCol());
io.writeInt4(((Range)colonPosition).getWideLine());
io.writeInt4(((Range)colonPosition).getWideCol());
io.writeInt4(((Range)colonPosition).getWideEndLine());
io.writeInt4(((Range)colonPosition).getWideEndCol());
if (_hasStatements != null) {
EdgeIterator<Statement> it = getStatementsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(!factory.getIsFiltered(_hasExpression) ? _hasExpression : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
((Range)colonPosition).setPathKey(io.readInt4());
((Range)colonPosition).setLine(io.readInt4());
((Range)colonPosition).setCol(io.readInt4());
((Range)colonPosition).setEndLine(io.readInt4());
((Range)colonPosition).setEndCol(io.readInt4());
((Range)colonPosition).setWideLine(io.readInt4());
((Range)colonPosition).setWideCol(io.readInt4());
((Range)colonPosition).setWideEndLine(io.readInt4());
((Range)colonPosition).setWideEndCol(io.readInt4());
_id = io.readInt4();
if (_id != 0) {
_hasStatements = new EdgeList<Statement>(factory);
while (_id != 0) {
_hasStatements.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
_hasExpression = io.readInt4();
if (_hasExpression != 0)
setParentEdge(_hasExpression);
}
}
| 9,884 | 25.289894 | 126 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/While.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.expr.Expression;
/**
* Interface While, which represents the {@link columbus.java.asg.statm.While While} node.
* @columbus.node (missing)
* @columbus.edge hasCondition ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface While extends Iteration {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.While#edgeHasCondition hasCondition} edge points to.
* @return Returns the end point of the hasCondition edge.
*/
public Expression getCondition();
/**
* Sets the {@link columbus.java.asg.statm.While#edgeHasCondition hasCondition} edge.
* @param id The new end point of the hasCondition edge.
*/
public void setCondition(int id);
/**
* Sets the {@link columbus.java.asg.statm.While#edgeHasCondition hasCondition} edge.
* @param node The new end point of the hasCondition edge.
*/
public void setCondition(Expression node);
}
| 1,716 | 32.019231 | 128 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Switch.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.java.asg.*;
/**
* Interface Switch, which represents the {@link columbus.java.asg.statm.Switch Switch} node.
* @columbus.node (missing)
* @columbus.attr blockStartPosition (Range) : (missing)
* @columbus.edge hasCases ({@link columbus.java.asg.statm.SwitchLabel SwitchLabel}, multiple) : (missing)
*/
public interface Switch extends Selection {
/**
* Gives back the {@link columbus.java.asg.statm.Switch#attributeBlockStartPosition blockStartPosition} of the node.
* @return Returns with the blockStartPosition.
*/
public Range getBlockStartPosition();
/**
* Sets the {@link columbus.java.asg.statm.Switch#attributeBlockStartPosition blockStartPosition} of the node.
* @param value The new value of the blockStartPosition.
*/
public void setBlockStartPosition(Range value);
/**
* Gives back iterator for the {@link columbus.java.asg.statm.Switch#edgeHasCases hasCases} edges.
* @return Returns an iterator for the hasCases edges.
*/
public EdgeIterator<SwitchLabel> getCasesIterator();
/**
* Tells whether the node has {@link columbus.java.asg.statm.Switch#edgeHasCases hasCases} edges or not.
* @return Returns true if the node doesn't have any hasCases edge.
*/
public boolean getCasesIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.statm.Switch#edgeHasCases hasCases} edges the node has.
* @return Returns with the number of hasCases edges.
*/
public int getCasesSize();
/**
* Adds a new {@link columbus.java.asg.statm.Switch#edgeHasCases hasCases} edge to the node.
* @param id The end point of the new hasCases edge.
*/
public void addCases(int id);
/**
* Adds a new {@link columbus.java.asg.statm.Switch#edgeHasCases hasCases} edge to the node.
* @param node The end point of the new hasCases edge.
*/
public void addCases(SwitchLabel node);
}
| 2,616 | 32.987013 | 117 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/Iteration.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
/**
* Interface Iteration, which represents the {@link columbus.java.asg.statm.Iteration Iteration} node.
* @columbus.node (missing)
* @columbus.edge hasSubstatement ({@link columbus.java.asg.statm.Statement Statement}, single) : (missing)
*/
public interface Iteration extends Statement {
/**
* Gives back the reference of the node the {@link columbus.java.asg.statm.Iteration#edgeHasSubstatement hasSubstatement} edge points to.
* @return Returns the end point of the hasSubstatement edge.
*/
public Statement getSubstatement();
/**
* Sets the {@link columbus.java.asg.statm.Iteration#edgeHasSubstatement hasSubstatement} edge.
* @param id The new end point of the hasSubstatement edge.
*/
public void setSubstatement(int id);
/**
* Sets the {@link columbus.java.asg.statm.Iteration#edgeHasSubstatement hasSubstatement} edge.
* @param node The new end point of the hasSubstatement edge.
*/
public void setSubstatement(Statement node);
}
| 1,738 | 33.098039 | 138 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/statm/ExpressionStatementImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.statm;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.statm.ExpressionStatement ExpressionStatement} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class ExpressionStatementImpl extends BaseImpl implements ExpressionStatement {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(ExpressionStatementImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasExpression;
public ExpressionStatementImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkExpressionStatement;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getExpression() {
if (_hasExpression == 0)
return null;
if (factory.getIsFiltered(_hasExpression))
return null;
return (Expression)factory.getRef(_hasExpression);
}
@Override
public void setExpression(int _id) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasExpression = _id;
setParentEdge(_hasExpression);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setExpression(Expression _node) {
if (_hasExpression != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasExpression" ));
_hasExpression = _node.getId();
setParentEdge(_hasExpression);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasExpression) ? _hasExpression : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasExpression = io.readInt4();
if (_hasExpression != 0)
setParentEdge(_hasExpression);
}
}
| 6,975 | 24.741697 | 141 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/Requires.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.java.asg.expr.Expression;
/**
* Interface Requires, which represents the {@link columbus.java.asg.module.Requires Requires} node.
* @columbus.node (missing)
* @columbus.attr isTransitive (boolean) : (missing)
* @columbus.attr isStatic (boolean) : (missing)
* @columbus.edge hasModuleName ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Requires extends ModuleDirective {
/**
* Gives back the {@link columbus.java.asg.module.Requires#attributeIsTransitive isTransitive} of the node.
* @return Returns with the isTransitive.
*/
public boolean getIsTransitive();
/**
* Sets the {@link columbus.java.asg.module.Requires#attributeIsTransitive isTransitive} of the node.
* @param value The new value of the isTransitive.
*/
public void setIsTransitive(boolean value);
/**
* Gives back the {@link columbus.java.asg.module.Requires#attributeIsStatic isStatic} of the node.
* @return Returns with the isStatic.
*/
public boolean getIsStatic();
/**
* Sets the {@link columbus.java.asg.module.Requires#attributeIsStatic isStatic} of the node.
* @param value The new value of the isStatic.
*/
public void setIsStatic(boolean value);
/**
* Gives back the reference of the node the {@link columbus.java.asg.module.Requires#edgeHasModuleName hasModuleName} edge points to.
* @return Returns the end point of the hasModuleName edge.
*/
public Expression getModuleName();
/**
* Sets the {@link columbus.java.asg.module.Requires#edgeHasModuleName hasModuleName} edge.
* @param id The new end point of the hasModuleName edge.
*/
public void setModuleName(int id);
/**
* Sets the {@link columbus.java.asg.module.Requires#edgeHasModuleName hasModuleName} edge.
* @param node The new end point of the hasModuleName edge.
*/
public void setModuleName(Expression node);
}
| 2,649 | 32.974359 | 134 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/ProvidesImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.module.Provides Provides} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class ProvidesImpl extends BaseImpl implements Provides {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(ProvidesImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasServiceName;
protected EdgeList<Expression> _hasImplementationNames;
public ProvidesImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkProvides;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getServiceName() {
if (_hasServiceName == 0)
return null;
if (factory.getIsFiltered(_hasServiceName))
return null;
return (Expression)factory.getRef(_hasServiceName);
}
@Override
public EdgeIterator<Expression> getImplementationNamesIterator() {
if (_hasImplementationNames == null)
return EdgeList.<Expression>emptyList().iterator();
else
return _hasImplementationNames.iterator();
}
@Override
public boolean getImplementationNamesIsEmpty() {
if (_hasImplementationNames == null)
return true;
else
return _hasImplementationNames.isEmpty();
}
@Override
public int getImplementationNamesSize() {
if (_hasImplementationNames == null)
return 0;
else
return _hasImplementationNames.size();
}
@Override
public void setServiceName(int _id) {
if (_hasServiceName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasServiceName" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasServiceName = _id;
setParentEdge(_hasServiceName);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setServiceName(Expression _node) {
if (_hasServiceName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasServiceName" ));
_hasServiceName = _node.getId();
setParentEdge(_hasServiceName);
}
@Override
public void addImplementationNames(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
if (_hasImplementationNames == null)
_hasImplementationNames = new EdgeList<Expression>(factory);
_hasImplementationNames.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addImplementationNames(Expression _node) {
if (_hasImplementationNames == null)
_hasImplementationNames = new EdgeList<Expression>(factory);
_hasImplementationNames.add(_node);
setParentEdge(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasServiceName) ? _hasServiceName : 0);
if (_hasImplementationNames != null) {
EdgeIterator<Expression> it = getImplementationNamesIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasServiceName = io.readInt4();
if (_hasServiceName != 0)
setParentEdge(_hasServiceName);
_id = io.readInt4();
if (_id != 0) {
_hasImplementationNames = new EdgeList<Expression>(factory);
while (_id != 0) {
_hasImplementationNames.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 8,774 | 24.808824 | 130 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/Opens.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.java.asg.*;
import columbus.java.asg.expr.Expression;
/**
* Interface Opens, which represents the {@link columbus.java.asg.module.Opens Opens} node.
* @columbus.node (missing)
* @columbus.edge hasPackageName ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
* @columbus.edge hasModuleNames ({@link columbus.java.asg.expr.Expression Expression}, multiple) : (missing)
*/
public interface Opens extends ModuleDirective {
/**
* Gives back the reference of the node the {@link columbus.java.asg.module.Opens#edgeHasPackageName hasPackageName} edge points to.
* @return Returns the end point of the hasPackageName edge.
*/
public Expression getPackageName();
/**
* Sets the {@link columbus.java.asg.module.Opens#edgeHasPackageName hasPackageName} edge.
* @param id The new end point of the hasPackageName edge.
*/
public void setPackageName(int id);
/**
* Sets the {@link columbus.java.asg.module.Opens#edgeHasPackageName hasPackageName} edge.
* @param node The new end point of the hasPackageName edge.
*/
public void setPackageName(Expression node);
/**
* Gives back iterator for the {@link columbus.java.asg.module.Opens#edgeHasModuleNames hasModuleNames} edges.
* @return Returns an iterator for the hasModuleNames edges.
*/
public EdgeIterator<Expression> getModuleNamesIterator();
/**
* Tells whether the node has {@link columbus.java.asg.module.Opens#edgeHasModuleNames hasModuleNames} edges or not.
* @return Returns true if the node doesn't have any hasModuleNames edge.
*/
public boolean getModuleNamesIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.module.Opens#edgeHasModuleNames hasModuleNames} edges the node has.
* @return Returns with the number of hasModuleNames edges.
*/
public int getModuleNamesSize();
/**
* Adds a new {@link columbus.java.asg.module.Opens#edgeHasModuleNames hasModuleNames} edge to the node.
* @param id The end point of the new hasModuleNames edge.
*/
public void addModuleNames(int id);
/**
* Adds a new {@link columbus.java.asg.module.Opens#edgeHasModuleNames hasModuleNames} edge to the node.
* @param node The end point of the new hasModuleNames edge.
*/
public void addModuleNames(Expression node);
}
| 3,042 | 35.22619 | 133 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/UsesImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.module.Uses Uses} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class UsesImpl extends BaseImpl implements Uses {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(UsesImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasServiceName;
public UsesImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkUses;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getServiceName() {
if (_hasServiceName == 0)
return null;
if (factory.getIsFiltered(_hasServiceName))
return null;
return (Expression)factory.getRef(_hasServiceName);
}
@Override
public void setServiceName(int _id) {
if (_hasServiceName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasServiceName" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasServiceName = _id;
setParentEdge(_hasServiceName);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setServiceName(Expression _node) {
if (_hasServiceName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasServiceName" ));
_hasServiceName = _node.getId();
setParentEdge(_hasServiceName);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasServiceName) ? _hasServiceName : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasServiceName = io.readInt4();
if (_hasServiceName != 0)
setParentEdge(_hasServiceName);
}
}
| 6,892 | 24.435424 | 126 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/RequiresImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.module.Requires Requires} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class RequiresImpl extends BaseImpl implements Requires {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(RequiresImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected boolean isTransitive;
protected boolean isStatic;
protected int _hasModuleName;
public RequiresImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkRequires;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public boolean getIsTransitive() {
return isTransitive;
}
@Override
public boolean getIsStatic() {
return isStatic;
}
@Override
public void setIsTransitive(boolean _isTransitive) {
isTransitive = _isTransitive;
}
@Override
public void setIsStatic(boolean _isStatic) {
isStatic = _isStatic;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getModuleName() {
if (_hasModuleName == 0)
return null;
if (factory.getIsFiltered(_hasModuleName))
return null;
return (Expression)factory.getRef(_hasModuleName);
}
@Override
public void setModuleName(int _id) {
if (_hasModuleName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasModuleName" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasModuleName = _id;
setParentEdge(_hasModuleName);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setModuleName(Expression _node) {
if (_hasModuleName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasModuleName" ));
_hasModuleName = _node.getId();
setParentEdge(_hasModuleName);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
{
byte boolValues = 0;
boolValues <<= 1;
if (isTransitive)
boolValues |= 1;
boolValues <<= 1;
if (isStatic)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasModuleName) ? _hasModuleName : 0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
{
byte boolValues = io.readByte1();
isStatic = (boolValues & 1) != 0;
boolValues >>>= 1;
isTransitive = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasModuleName = io.readInt4();
if (_hasModuleName != 0)
setParentEdge(_hasModuleName);
}
}
| 7,644 | 23.42492 | 130 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/OpensImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.module.Opens Opens} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class OpensImpl extends BaseImpl implements Opens {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(OpensImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasPackageName;
protected EdgeList<Expression> _hasModuleNames;
public OpensImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkOpens;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getPackageName() {
if (_hasPackageName == 0)
return null;
if (factory.getIsFiltered(_hasPackageName))
return null;
return (Expression)factory.getRef(_hasPackageName);
}
@Override
public EdgeIterator<Expression> getModuleNamesIterator() {
if (_hasModuleNames == null)
return EdgeList.<Expression>emptyList().iterator();
else
return _hasModuleNames.iterator();
}
@Override
public boolean getModuleNamesIsEmpty() {
if (_hasModuleNames == null)
return true;
else
return _hasModuleNames.isEmpty();
}
@Override
public int getModuleNamesSize() {
if (_hasModuleNames == null)
return 0;
else
return _hasModuleNames.size();
}
@Override
public void setPackageName(int _id) {
if (_hasPackageName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasPackageName" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasPackageName = _id;
setParentEdge(_hasPackageName);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setPackageName(Expression _node) {
if (_hasPackageName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasPackageName" ));
_hasPackageName = _node.getId();
setParentEdge(_hasPackageName);
}
@Override
public void addModuleNames(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
if (_hasModuleNames == null)
_hasModuleNames = new EdgeList<Expression>(factory);
_hasModuleNames.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addModuleNames(Expression _node) {
if (_hasModuleNames == null)
_hasModuleNames = new EdgeList<Expression>(factory);
_hasModuleNames.add(_node);
setParentEdge(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasPackageName) ? _hasPackageName : 0);
if (_hasModuleNames != null) {
EdgeIterator<Expression> it = getModuleNamesIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasPackageName = io.readInt4();
if (_hasPackageName != 0)
setParentEdge(_hasPackageName);
_id = io.readInt4();
if (_id != 0) {
_hasModuleNames = new EdgeList<Expression>(factory);
while (_id != 0) {
_hasModuleNames.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 8,577 | 24.229412 | 127 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/Uses.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.java.asg.expr.Expression;
/**
* Interface Uses, which represents the {@link columbus.java.asg.module.Uses Uses} node.
* @columbus.node (missing)
* @columbus.edge hasServiceName ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
*/
public interface Uses extends ModuleDirective {
/**
* Gives back the reference of the node the {@link columbus.java.asg.module.Uses#edgeHasServiceName hasServiceName} edge points to.
* @return Returns the end point of the hasServiceName edge.
*/
public Expression getServiceName();
/**
* Sets the {@link columbus.java.asg.module.Uses#edgeHasServiceName hasServiceName} edge.
* @param id The new end point of the hasServiceName edge.
*/
public void setServiceName(int id);
/**
* Sets the {@link columbus.java.asg.module.Uses#edgeHasServiceName hasServiceName} edge.
* @param node The new end point of the hasServiceName edge.
*/
public void setServiceName(Expression node);
}
| 1,746 | 32.596154 | 132 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/Provides.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.java.asg.*;
import columbus.java.asg.expr.Expression;
/**
* Interface Provides, which represents the {@link columbus.java.asg.module.Provides Provides} node.
* @columbus.node (missing)
* @columbus.edge hasServiceName ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
* @columbus.edge hasImplementationNames ({@link columbus.java.asg.expr.Expression Expression}, multiple) : (missing)
*/
public interface Provides extends ModuleDirective {
/**
* Gives back the reference of the node the {@link columbus.java.asg.module.Provides#edgeHasServiceName hasServiceName} edge points to.
* @return Returns the end point of the hasServiceName edge.
*/
public Expression getServiceName();
/**
* Sets the {@link columbus.java.asg.module.Provides#edgeHasServiceName hasServiceName} edge.
* @param id The new end point of the hasServiceName edge.
*/
public void setServiceName(int id);
/**
* Sets the {@link columbus.java.asg.module.Provides#edgeHasServiceName hasServiceName} edge.
* @param node The new end point of the hasServiceName edge.
*/
public void setServiceName(Expression node);
/**
* Gives back iterator for the {@link columbus.java.asg.module.Provides#edgeHasImplementationNames hasImplementationNames} edges.
* @return Returns an iterator for the hasImplementationNames edges.
*/
public EdgeIterator<Expression> getImplementationNamesIterator();
/**
* Tells whether the node has {@link columbus.java.asg.module.Provides#edgeHasImplementationNames hasImplementationNames} edges or not.
* @return Returns true if the node doesn't have any hasImplementationNames edge.
*/
public boolean getImplementationNamesIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.module.Provides#edgeHasImplementationNames hasImplementationNames} edges the node has.
* @return Returns with the number of hasImplementationNames edges.
*/
public int getImplementationNamesSize();
/**
* Adds a new {@link columbus.java.asg.module.Provides#edgeHasImplementationNames hasImplementationNames} edge to the node.
* @param id The end point of the new hasImplementationNames edge.
*/
public void addImplementationNames(int id);
/**
* Adds a new {@link columbus.java.asg.module.Provides#edgeHasImplementationNames hasImplementationNames} edge to the node.
* @param node The end point of the new hasImplementationNames edge.
*/
public void addImplementationNames(Expression node);
}
| 3,246 | 37.654762 | 136 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/ExportsImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.base.Base;
import columbus.java.asg.expr.Expression;
import columbus.java.asg.base.Comment;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.module.Exports Exports} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class ExportsImpl extends BaseImpl implements Exports {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(ExportsImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected EdgeList<Comment> _comments;
protected Object position;
protected boolean isCompilerGenerated;
protected boolean isToolGenerated;
protected int _hasPackageName;
protected EdgeList<Expression> _hasModuleNames;
public ExportsImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkExports;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public boolean getIsCompilerGenerated() {
return isCompilerGenerated;
}
@Override
public boolean getIsToolGenerated() {
return isToolGenerated;
}
@Override
public void setIsCompilerGenerated(boolean _isCompilerGenerated) {
isCompilerGenerated = _isCompilerGenerated;
}
@Override
public void setIsToolGenerated(boolean _isToolGenerated) {
isToolGenerated = _isToolGenerated;
}
@Override
public EdgeIterator<Comment> getCommentsIterator() {
if (_comments == null)
return EdgeList.<Comment>emptyList().iterator();
else
return _comments.iterator();
}
@Override
public boolean getCommentsIsEmpty() {
if (_comments == null)
return true;
else
return _comments.isEmpty();
}
@Override
public int getCommentsSize() {
if (_comments == null)
return 0;
else
return _comments.size();
}
@Override
public void addComments(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkComment)) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void addComments(Comment _node) {
if (_comments == null)
_comments = new EdgeList<Comment>(factory);
_comments.add(_node);
}
@Override
public Expression getPackageName() {
if (_hasPackageName == 0)
return null;
if (factory.getIsFiltered(_hasPackageName))
return null;
return (Expression)factory.getRef(_hasPackageName);
}
@Override
public EdgeIterator<Expression> getModuleNamesIterator() {
if (_hasModuleNames == null)
return EdgeList.<Expression>emptyList().iterator();
else
return _hasModuleNames.iterator();
}
@Override
public boolean getModuleNamesIsEmpty() {
if (_hasModuleNames == null)
return true;
else
return _hasModuleNames.isEmpty();
}
@Override
public int getModuleNamesSize() {
if (_hasModuleNames == null)
return 0;
else
return _hasModuleNames.size();
}
@Override
public void setPackageName(int _id) {
if (_hasPackageName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasPackageName" ));
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
_hasPackageName = _id;
setParentEdge(_hasPackageName);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
}
@Override
public void setPackageName(Expression _node) {
if (_hasPackageName != 0)
throw new JavaException(logger.formatMessage("ex.java.Node.The_previous_end_point","hasPackageName" ));
_hasPackageName = _node.getId();
setParentEdge(_hasPackageName);
}
@Override
public void addModuleNames(int _id) {
if (!factory.getExist(_id))
throw new JavaException(logger.formatMessage("ex.java.Node.No_end_point"));
Base _node = factory.getRef(_id);
if (Common.getIsBaseClassKind(_node.getNodeKind(), NodeKind.ndkExpression)) {
if (_hasModuleNames == null)
_hasModuleNames = new EdgeList<Expression>(factory);
_hasModuleNames.add(_id);
} else {
throw new JavaException(logger.formatMessage("ex.java.Node.Invalid","NodeKind", _node.getNodeKind() ));
}
setParentEdge(_id);
}
@Override
public void addModuleNames(Expression _node) {
if (_hasModuleNames == null)
_hasModuleNames = new EdgeList<Expression>(factory);
_hasModuleNames.add(_node);
setParentEdge(_node);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
if (_comments != null) {
EdgeIterator<Comment> it = getCommentsIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
{
byte boolValues = 0;
boolValues <<= 1;
if (isCompilerGenerated)
boolValues |= 1;
boolValues <<= 1;
if (isToolGenerated)
boolValues |= 1;
io.writeByte1(boolValues);
}
io.writeInt4(!factory.getIsFiltered(_hasPackageName) ? _hasPackageName : 0);
if (_hasModuleNames != null) {
EdgeIterator<Expression> it = getModuleNamesIterator();
while (it.hasNext()) {
io.writeInt4(it.next().getId());
}
}
io.writeInt4(0);
}
// ---------- Load ----------
@Override
public void load(IO io) {
int _id;
_id = io.readInt4();
if (_id != 0) {
_comments = new EdgeList<Comment>(factory);
while (_id != 0) {
_comments.add(_id);
_id = io.readInt4();
}
}
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
{
byte boolValues = io.readByte1();
isToolGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
isCompilerGenerated = (boolValues & 1) != 0;
boolValues >>>= 1;
}
_hasPackageName = io.readInt4();
if (_hasPackageName != 0)
setParentEdge(_hasPackageName);
_id = io.readInt4();
if (_id != 0) {
_hasModuleNames = new EdgeList<Expression>(factory);
while (_id != 0) {
_hasModuleNames.add(_id);
setParentEdge(_id);
_id = io.readInt4();
}
}
}
}
| 8,591 | 24.270588 | 129 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/ModuleDirective.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.java.asg.base.Positioned;
/**
* Interface ModuleDirective, which represents the {@link columbus.java.asg.module.ModuleDirective ModuleDirective} node.
* @columbus.node (missing)
*/
public interface ModuleDirective extends Positioned {
}
| 1,025 | 30.090909 | 121 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/module/Exports.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.module;
import columbus.java.asg.*;
import columbus.java.asg.expr.Expression;
/**
* Interface Exports, which represents the {@link columbus.java.asg.module.Exports Exports} node.
* @columbus.node (missing)
* @columbus.edge hasPackageName ({@link columbus.java.asg.expr.Expression Expression}, single) : (missing)
* @columbus.edge hasModuleNames ({@link columbus.java.asg.expr.Expression Expression}, multiple) : (missing)
*/
public interface Exports extends ModuleDirective {
/**
* Gives back the reference of the node the {@link columbus.java.asg.module.Exports#edgeHasPackageName hasPackageName} edge points to.
* @return Returns the end point of the hasPackageName edge.
*/
public Expression getPackageName();
/**
* Sets the {@link columbus.java.asg.module.Exports#edgeHasPackageName hasPackageName} edge.
* @param id The new end point of the hasPackageName edge.
*/
public void setPackageName(int id);
/**
* Sets the {@link columbus.java.asg.module.Exports#edgeHasPackageName hasPackageName} edge.
* @param node The new end point of the hasPackageName edge.
*/
public void setPackageName(Expression node);
/**
* Gives back iterator for the {@link columbus.java.asg.module.Exports#edgeHasModuleNames hasModuleNames} edges.
* @return Returns an iterator for the hasModuleNames edges.
*/
public EdgeIterator<Expression> getModuleNamesIterator();
/**
* Tells whether the node has {@link columbus.java.asg.module.Exports#edgeHasModuleNames hasModuleNames} edges or not.
* @return Returns true if the node doesn't have any hasModuleNames edge.
*/
public boolean getModuleNamesIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.module.Exports#edgeHasModuleNames hasModuleNames} edges the node has.
* @return Returns with the number of hasModuleNames edges.
*/
public int getModuleNamesSize();
/**
* Adds a new {@link columbus.java.asg.module.Exports#edgeHasModuleNames hasModuleNames} edge to the node.
* @param id The end point of the new hasModuleNames edge.
*/
public void addModuleNames(int id);
/**
* Adds a new {@link columbus.java.asg.module.Exports#edgeHasModuleNames hasModuleNames} edge to the node.
* @param node The end point of the new hasModuleNames edge.
*/
public void addModuleNames(Expression node);
}
| 3,066 | 35.511905 | 135 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/Positioned.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
/**
* Interface Positioned, which represents the {@link columbus.java.asg.base.Positioned Positioned} node.
* @columbus.node (missing)
* @columbus.attr isCompilerGenerated (boolean) : (missing)
* @columbus.attr isToolGenerated (boolean) : (missing)
*/
public interface Positioned extends Commentable, PositionedWithoutComment {
/**
* Gives back the {@link columbus.java.asg.base.Positioned#attributeIsCompilerGenerated isCompilerGenerated} of the node.
* @return Returns with the isCompilerGenerated.
*/
public boolean getIsCompilerGenerated();
/**
* Sets the {@link columbus.java.asg.base.Positioned#attributeIsCompilerGenerated isCompilerGenerated} of the node.
* @param value The new value of the isCompilerGenerated.
*/
public void setIsCompilerGenerated(boolean value);
/**
* Gives back the {@link columbus.java.asg.base.Positioned#attributeIsToolGenerated isToolGenerated} of the node.
* @return Returns with the isToolGenerated.
*/
public boolean getIsToolGenerated();
/**
* Sets the {@link columbus.java.asg.base.Positioned#attributeIsToolGenerated isToolGenerated} of the node.
* @param value The new value of the isToolGenerated.
*/
public void setIsToolGenerated(boolean value);
}
| 2,000 | 33.5 | 122 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/Comment.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
/**
* Interface Comment, which represents the {@link columbus.java.asg.base.Comment Comment} node.
* @columbus.node (missing)
* @columbus.attr text (String) : (missing)
*/
public interface Comment extends PositionedWithoutComment {
/**
* Gives back the {@link columbus.java.asg.base.Comment#attributeText text} of the node.
* @return Returns with the text.
*/
public String getText();
/**
* Gives back the Key of {@link columbus.java.asg.base.Comment#attributeText text} of the node.
* @return Returns with the Key of the text.
*/
public int getTextKey();
/**
* Sets the {@link columbus.java.asg.base.Comment#attributeText text} of the node.
* @param value The new value of the text.
*/
public void setText(String value);
}
| 1,522 | 28.862745 | 96 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/BlockComment.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
/**
* Interface BlockComment, which represents the {@link columbus.java.asg.base.BlockComment BlockComment} node.
* @columbus.node (missing)
*/
public interface BlockComment extends NonJavadocComment {
}
| 974 | 29.46875 | 110 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/Commentable.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.java.asg.*;
/**
* Interface Commentable, which represents the {@link columbus.java.asg.base.Commentable Commentable} node.
* @columbus.node (missing)
* @columbus.edge comments ({@link columbus.java.asg.base.Comment Comment}, multiple) : (missing)
*/
public interface Commentable extends Base {
/**
* Gives back iterator for the {@link columbus.java.asg.base.Commentable#edgeComments comments} edges.
* @return Returns an iterator for the comments edges.
*/
public EdgeIterator<Comment> getCommentsIterator();
/**
* Tells whether the node has {@link columbus.java.asg.base.Commentable#edgeComments comments} edges or not.
* @return Returns true if the node doesn't have any comments edge.
*/
public boolean getCommentsIsEmpty();
/**
* Gives back how many {@link columbus.java.asg.base.Commentable#edgeComments comments} edges the node has.
* @return Returns with the number of comments edges.
*/
public int getCommentsSize();
/**
* Adds a new {@link columbus.java.asg.base.Commentable#edgeComments comments} edge to the node.
* @param id The end point of the new comments edge.
*/
public void addComments(int id);
/**
* Adds a new {@link columbus.java.asg.base.Commentable#edgeComments comments} edge to the node.
* @param node The end point of the new comments edge.
*/
public void addComments(Comment node);
}
| 2,143 | 32.5 | 109 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/LineCommentImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.base.LineComment LineComment} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class LineCommentImpl extends BaseImpl implements LineComment {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(LineCommentImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected Object position;
protected int text;
public LineCommentImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkLineComment;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public String getText() {
return factory.getStringTable().get(text);
}
@Override
public int getTextKey() {
return text;
}
@Override
public void setText(String _text) {
text = factory.getStringTable().set(_text);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
io.writeInt4(text);
}
// ---------- Load ----------
@Override
public void load(IO io) {
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
text = io.readInt4();
}
}
| 3,451 | 24.57037 | 133 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/Base.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
/**
* Interface Base, which represents the {@link columbus.java.asg.base.Base Base} node.
* @columbus.node (missing)
* @columbus.attr id (int) : (missing)
*/
public interface Base {
/**
* Gives back the NodeKind of the node.
* @return Returns with the NodeKind.
*/
public NodeKind getNodeKind();
/**
* Gives back the Factory the node belongs to.
* @return Return with a reference to the Factory.
*/
public Factory getFactory();
/**
* It calls the appropriate visit method of the given visitor.
* @param visitor The used visitor.
*/
public void accept(Visitor visitor);
/**
* It calls the appropriate visitEnd method of the given visitor.
* @param visitor The used visitor.
*/
public void acceptEnd(Visitor visitor);
/**
* Saves the node.
* @param io The node is written into io.
*/
public void save(IO io);
/**
* Loads the node.
* @param io The node is read from io.
*/
public void load(IO io);
/**
* Gives back the reference of the parent of this node.
* @return Return with the reference of the parent of this node or null if it does not have one.
*/
public Base getParent();
/**
* Gives back the {@link columbus.java.asg.base.Base#attributeId id} of the node.
* @return Returns with the id.
*/
public int getId();
}
| 2,187 | 24.741176 | 97 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/PositionedWithoutComment.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.java.asg.*;
/**
* Interface PositionedWithoutComment, which represents the {@link columbus.java.asg.base.PositionedWithoutComment PositionedWithoutComment} node.
* @columbus.node (missing)
* @columbus.attr position (Range) : (missing)
*/
public interface PositionedWithoutComment extends Base {
/**
* Gives back the {@link columbus.java.asg.base.PositionedWithoutComment#attributePosition position} of the node.
* @return Returns with the position.
*/
public Range getPosition();
/**
* Sets the {@link columbus.java.asg.base.PositionedWithoutComment#attributePosition position} of the node.
* @param value The new value of the position.
*/
public void setPosition(Range value);
}
| 1,485 | 31.304348 | 146 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/NonJavadocComment.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
/**
* Interface NonJavadocComment, which represents the {@link columbus.java.asg.base.NonJavadocComment NonJavadocComment} node.
* @columbus.node (missing)
*/
public interface NonJavadocComment extends Comment {
}
| 984 | 29.78125 | 125 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/JavadocCommentImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.base.JavadocComment JavadocComment} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class JavadocCommentImpl extends BaseImpl implements JavadocComment {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(JavadocCommentImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected Object position;
protected int text;
public JavadocCommentImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkJavadocComment;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public String getText() {
return factory.getStringTable().get(text);
}
@Override
public int getTextKey() {
return text;
}
@Override
public void setText(String _text) {
text = factory.getStringTable().set(_text);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
io.writeInt4(text);
}
// ---------- Load ----------
@Override
public void load(IO io) {
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
text = io.readInt4();
}
}
| 3,472 | 24.725926 | 136 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/BlockCommentImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.base.BlockComment BlockComment} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class BlockCommentImpl extends BaseImpl implements BlockComment {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(BlockCommentImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected Object position;
protected int text;
public BlockCommentImpl(int id, Factory factory) {
super(id, factory);
position = new Range(factory.getStringTable());
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkBlockComment;
}
@Override
public Range getPosition() {
return (Range)position;
}
@Override
public void setPosition(Range _position) {
if (factory.getStringTable() == _position.getStringTable())
position = _position;
else
position = new Range(factory.getStringTable(), _position);
}
@Override
public String getText() {
return factory.getStringTable().get(text);
}
@Override
public int getTextKey() {
return text;
}
@Override
public void setText(String _text) {
text = factory.getStringTable().set(_text);
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
io.writeInt4(((Range)position).getPathKey());
io.writeInt4(((Range)position).getLine());
io.writeInt4(((Range)position).getCol());
io.writeInt4(((Range)position).getEndLine());
io.writeInt4(((Range)position).getEndCol());
io.writeInt4(((Range)position).getWideLine());
io.writeInt4(((Range)position).getWideCol());
io.writeInt4(((Range)position).getWideEndLine());
io.writeInt4(((Range)position).getWideEndCol());
io.writeInt4(text);
}
// ---------- Load ----------
@Override
public void load(IO io) {
((Range)position).setPathKey(io.readInt4());
((Range)position).setLine(io.readInt4());
((Range)position).setCol(io.readInt4());
((Range)position).setEndLine(io.readInt4());
((Range)position).setEndCol(io.readInt4());
((Range)position).setWideLine(io.readInt4());
((Range)position).setWideCol(io.readInt4());
((Range)position).setWideEndLine(io.readInt4());
((Range)position).setWideEndCol(io.readInt4());
text = io.readInt4();
}
}
| 3,458 | 24.622222 | 134 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/JavadocComment.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
/**
* Interface JavadocComment, which represents the {@link columbus.java.asg.base.JavadocComment JavadocComment} node.
* @columbus.node (missing)
*/
public interface JavadocComment extends Comment {
}
| 972 | 29.40625 | 116 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/BaseImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.base.Base Base} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public abstract class BaseImpl implements Base {
protected Factory factory;
protected int parent;
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(BaseImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
protected int id;
public BaseImpl(int id, Factory factory) {
this.id = id;
this.factory = factory;
}
@Override
public abstract NodeKind getNodeKind();
@Override
public Factory getFactory() {
return factory;
}
protected void setParentEdge(int childId) {
((BaseImpl)factory.getRef(childId)).parent = id;
}
protected void setParentEdge(Base childNode) {
((BaseImpl)childNode).parent = id;
}
protected void removeParentEdge(int childId) {
((BaseImpl)factory.getRef(childId)).parent = 0;
}
protected void removeParentEdge(Base childNode) {
((BaseImpl)childNode).parent = 0;
}
protected void setParent(int parentId) {
parent = parentId;
}
@Override
public Base getParent() {
return parent == 0 ? null : factory.getRef(parent);
}
@Override
public int getId() {
return id;
}
protected void setId(int _id) {
id = _id;
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
}
@Override
public void acceptEnd(Visitor visitor) {
}
// ---------- Save ----------
@Override
public abstract void save(IO io);
// ---------- Load ----------
@Override
public abstract void load(IO io);
}
| 2,522 | 21.131579 | 126 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/LineComment.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
/**
* Interface LineComment, which represents the {@link columbus.java.asg.base.LineComment LineComment} node.
* @columbus.node (missing)
*/
public interface LineComment extends NonJavadocComment {
}
| 970 | 29.34375 | 107 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/base/Named.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.base;
import columbus.java.asg.*;
/**
* Interface Named, which represents the {@link columbus.java.asg.base.Named Named} node.
* @columbus.node (missing)
* @columbus.attr name (String) : (missing)
* @columbus.attr namePosition (Range) : (missing)
*/
public interface Named extends Base {
/**
* Gives back the {@link columbus.java.asg.base.Named#attributeName name} of the node.
* @return Returns with the name.
*/
public String getName();
/**
* Gives back the Key of {@link columbus.java.asg.base.Named#attributeName name} of the node.
* @return Returns with the Key of the name.
*/
public int getNameKey();
/**
* Sets the {@link columbus.java.asg.base.Named#attributeName name} of the node.
* @param value The new value of the name.
*/
public void setName(String value);
/**
* Gives back the {@link columbus.java.asg.base.Named#attributeNamePosition namePosition} of the node.
* @return Returns with the namePosition.
*/
public Range getNamePosition();
/**
* Sets the {@link columbus.java.asg.base.Named#attributeNamePosition namePosition} of the node.
* @param value The new value of the namePosition.
*/
public void setNamePosition(Range value);
}
| 1,962 | 29.2 | 103 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/type/PrimitiveType.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.type;
/**
* Interface PrimitiveType, which represents the {@link columbus.java.asg.type.PrimitiveType PrimitiveType} node.
* @columbus.node (missing)
*/
public interface PrimitiveType extends Type {
}
| 965 | 29.1875 | 113 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/type/UpperBoundedWildcardType.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.type;
/**
* Interface UpperBoundedWildcardType, which represents the {@link columbus.java.asg.type.UpperBoundedWildcardType UpperBoundedWildcardType} node.
* @columbus.node (missing)
*/
public interface UpperBoundedWildcardType extends BoundedWildcardType {
}
| 1,024 | 31.03125 | 146 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/type/ByteType.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.type;
/**
* Interface ByteType, which represents the {@link columbus.java.asg.type.ByteType ByteType} node.
* @columbus.node (missing)
*/
public interface ByteType extends PrimitiveType {
}
| 954 | 28.84375 | 98 | java |
OpenStaticAnalyzer | OpenStaticAnalyzer-master/java/lib/java/src/main/java/columbus/java/asg/type/NoTypeImpl.java | /*
* This file is part of OpenStaticAnalyzer.
*
* Copyright (c) 2004-2018 Department of Software Engineering - University of Szeged
*
* Licensed under Version 1.2 of the EUPL (the "Licence");
*
* You may not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence in the LICENSE file or at:
*
* https://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package columbus.java.asg.type;
import columbus.IO;
import columbus.java.asg.*;
import columbus.java.asg.base.BaseImpl;
import columbus.java.asg.enums.*;
import columbus.java.asg.visitors.Visitor;
import columbus.logger.LoggerHandler;
/**
* Implementation class for the {@link columbus.java.asg.type.NoType NoType} node.
* <p><b>WARNING: For internal use only.</b></p>
*/
public class NoTypeImpl extends BaseImpl implements NoType {
@SuppressWarnings("unused")
private static final LoggerHandler logger = new LoggerHandler(NoTypeImpl.class, columbus.java.asg.Constant.LoggerPropertyFile);
public NoTypeImpl(int id, Factory factory) {
super(id, factory);
}
@Override
public NodeKind getNodeKind() {
return NodeKind.ndkNoType;
}
// ---------- Accept methods for Visitor ----------
@Override
public void accept(Visitor visitor) {
visitor.visit(this, true);
}
@Override
public void acceptEnd(Visitor visitor) {
visitor.visitEnd(this, true);
}
// ---------- Save ----------
@Override
public void save(IO io) {
io.writeInt4(id);
io.writeUShort2(getNodeKind().ordinal());
}
// ---------- Load ----------
@Override
public void load(IO io) {
}
}
| 1,922 | 23.341772 | 128 | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.