* implemented this feature for both, CXX and Java * adjusted tests to reflect these changes * added NameElement and NameHierarchy to Java code * created more specialized JavaDeclName classes: JavaFunctionDeclName and JavaVariableDeclName * implemented recording static modifier for Java methods and variables fortune cookie message = You will enjoy true success in whatever you do.
50 lines
1013 B
Java
50 lines
1013 B
Java
package com.sourcetrail;
|
|
|
|
import com.github.javaparser.ast.type.TypeParameter;
|
|
import com.github.javaparser.ast.NodeList;
|
|
import com.github.javaparser.ast.body.BodyDeclaration;
|
|
import com.github.javaparser.ast.body.ConstructorDeclaration;
|
|
import com.github.javaparser.ast.body.Parameter;
|
|
import com.github.javaparser.ast.type.Type;
|
|
import com.github.javaparser.ast.type.UnknownType;
|
|
|
|
public class CallableConstructorDecl implements CallableDecl
|
|
{
|
|
private ConstructorDeclaration m_decl;
|
|
|
|
public CallableConstructorDecl(ConstructorDeclaration decl)
|
|
{
|
|
m_decl = decl;
|
|
}
|
|
|
|
public BodyDeclaration getWrappedNode()
|
|
{
|
|
return m_decl;
|
|
}
|
|
|
|
public String getName()
|
|
{
|
|
return m_decl.getNameAsString();
|
|
}
|
|
|
|
public NodeList<TypeParameter> getTypeParameters()
|
|
{
|
|
return m_decl.getTypeParameters();
|
|
}
|
|
|
|
public NodeList<Parameter> getParameters()
|
|
{
|
|
return m_decl.getParameters();
|
|
}
|
|
|
|
public Type getType()
|
|
{
|
|
return new UnknownType();
|
|
}
|
|
|
|
public boolean isStatic()
|
|
{
|
|
return m_decl.isStatic();
|
|
}
|
|
}
|