Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better deal with exception #55

Merged
merged 9 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
11 changes: 6 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@

<!-- Creates Javadoc -->
<target name="docs" depends="compile">
<javadoc packagenames="src" sourcepath="${src.dir}" destdir="${docs.dir}">
<!-- Define which files / directory should get included, we include all -->
<fileset dir="${src.dir}">
<include name="**" />
</fileset>
<javadoc sourcepath="${src.dir}" destdir="${docs.dir}">
<classpath>
<fileset dir="${dist.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>

Expand Down
Binary file modified lib/verveine.extractor.java.jar
Binary file not shown.
28 changes: 14 additions & 14 deletions src/fr/inria/verveine/extractor/java/AbstractDictionary.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public TNamedEntity getEntityByKey(B key) {
* @param e -- the Named entity
* @return the key associated to this entity or null if none
*/
public B getEntityKey(NamedEntity e) {
public B getEntityKey(TNamedEntity e) {
return entityToKey.get(e);
}

Expand Down Expand Up @@ -287,7 +287,7 @@ public Type ensureFamixType(B key, String name, TWithTypes owner, boolean persis
* @param persistIt -- whether the Class should be persisted in the Famix repository
* @return the FAMIX Class or null in case of a FAMIX error
*/
public org.moosetechnology.model.famixjava.famixjavaentities.Class ensureFamixClass(B key, String name, ContainerEntity owner, boolean persistIt) {
public org.moosetechnology.model.famixjava.famixjavaentities.Class ensureFamixClass(B key, String name, TWithTypes owner, boolean persistIt) {
org.moosetechnology.model.famixjava.famixjavaentities.Class fmx = ensureFamixEntity(org.moosetechnology.model.famixjava.famixjavaentities.Class.class, key, name, persistIt);
fmx.setTypeContainer(owner);
return fmx;
Expand All @@ -301,7 +301,7 @@ public org.moosetechnology.model.famixjava.famixjavaentities.Class ensureFamixCl
* @param persistIt -- whether the Class should be persisted in the Famix repository
* @return the FAMIX Class or null in case of a FAMIX error
*/
public org.moosetechnology.model.famixjava.famixjavaentities.Exception ensureFamixException(B key, String name, ContainerEntity owner, boolean persistIt) {
public org.moosetechnology.model.famixjava.famixjavaentities.Exception ensureFamixException(B key, String name, TWithTypes owner, boolean persistIt) {
org.moosetechnology.model.famixjava.famixjavaentities.Exception fmx = ensureFamixEntity(org.moosetechnology.model.famixjava.famixjavaentities.Exception.class, key, name, persistIt);
fmx.setTypeContainer(owner);
return fmx;
Expand All @@ -315,7 +315,7 @@ public org.moosetechnology.model.famixjava.famixjavaentities.Exception ensureFam
* @param persistIt -- whether the Class should be persisted in the Famix repository
* @return the FAMIX Class or null in case of a FAMIX error
*/
public Interface ensureFamixInterface(B key, String name, ContainerEntity owner, boolean persistIt) {
public Interface ensureFamixInterface(B key, String name, TWithTypes owner, boolean persistIt) {
Interface fmx = ensureFamixEntity(Interface.class, key, name, persistIt);
fmx.setTypeContainer(owner);
return fmx;
Expand All @@ -328,7 +328,7 @@ public Interface ensureFamixInterface(B key, String name, ContainerEntity owner,
* @param persistIt -- whether the ParameterizableClass should be persisted in the Famix repository
* @return the FAMIX Class or null in case of a FAMIX error
*/
public ParameterizableClass ensureFamixParameterizableClass(B key, String name, ContainerEntity owner, boolean persistIt) {
public ParameterizableClass ensureFamixParameterizableClass(B key, String name, TWithTypes owner, boolean persistIt) {
ParameterizableClass fmx = ensureFamixEntity(ParameterizableClass.class, key, name, persistIt);
fmx.setTypeContainer(owner);
return fmx;
Expand All @@ -341,7 +341,7 @@ public ParameterizableClass ensureFamixParameterizableClass(B key, String name,
* @param persistIt -- whether the ParameterizableInterface should be persisted in the Famix repository
* @return the FAMIX Class or null in case of a FAMIX error
*/
public ParameterizableInterface ensureFamixParameterizableInterface(B key, String name, ContainerEntity owner, boolean persistIt) {
public ParameterizableInterface ensureFamixParameterizableInterface(B key, String name, TWithTypes owner, boolean persistIt) {
ParameterizableInterface fmx = ensureFamixEntity(ParameterizableInterface.class, key, name, persistIt);
fmx.setTypeContainer(owner);
return fmx;
Expand All @@ -353,7 +353,7 @@ public ParameterizableInterface ensureFamixParameterizableInterface(B key, Strin
* @param persistIt -- whether the ParameterizableClass should be persisted in the Famix repository
* @return the FAMIX ParameterizableType or null in case of a FAMIX error
*/
public ParameterizedType ensureFamixParameterizedType(B key, String name, TWithParameterizedTypes generic, ContainerEntity owner, boolean persistIt) {
public ParameterizedType ensureFamixParameterizedType(B key, String name, TWithParameterizedTypes generic, TWithTypes owner, boolean persistIt) {
ParameterizedType fmx = ensureFamixEntity(ParameterizedType.class, key, name, persistIt);
fmx.setTypeContainer(owner);
fmx.setParameterizableClass(generic);
Expand All @@ -367,13 +367,13 @@ public ParameterizedType ensureFamixParameterizedType(B key, String name, TWithP
* @param persistIt -- whether the ParameterType should be persisted in the Famix repository
* @return the FAMIX ParameterType or null in case of a FAMIX error
*/
public ParameterType ensureFamixParameterType(B key, String name, ContainerEntity owner, boolean persistIt) {
public ParameterType ensureFamixParameterType(B key, String name, TWithTypes owner, boolean persistIt) {
ParameterType fmx = ensureFamixEntity(ParameterType.class, key, name, persistIt);
fmx.setTypeContainer(owner);
return fmx;
}

public Enum ensureFamixEnum(B key, String name, ContainerEntity owner, boolean persistIt) {
public Enum ensureFamixEnum(B key, String name, TWithTypes owner, boolean persistIt) {
Enum fmx = ensureFamixEntity(Enum.class, key, name, persistIt);
fmx.setTypeContainer(owner);
return fmx;
Expand Down Expand Up @@ -440,11 +440,11 @@ public PrimitiveType ensureFamixPrimitiveType(B key, String name) {
* @param persistIt -- whether the Method should be persisted in the Famix repository
* @return the FAMIX Method or null in case of a FAMIX error
*/
public Method ensureFamixMethod(B key, String name, String sig, TType ret, TType owner, boolean persistIt) {
public Method ensureFamixMethod(B key, String name, String sig, TType ret, TWithMethods owner, boolean persistIt) {
Method fmx = ensureFamixEntity(Method.class, key, name, persistIt);
fmx.setSignature(sig);
fmx.setDeclaredType(ret);
fmx.setParentType((TWithMethods) owner);
fmx.setParentType(owner);
return fmx;
}

Expand All @@ -457,9 +457,9 @@ public Method ensureFamixMethod(B key, String name, String sig, TType ret, TType
* @param persistIt -- whether the Attribute should be persisted in the Famix repository
* @return the FAMIX Attribute or null in case of a FAMIX error
*/
public Attribute ensureFamixAttribute(B key, String name, Type type, TType owner, boolean persistIt) {
public Attribute ensureFamixAttribute(B key, String name, Type type, TWithAttributes owner, boolean persistIt) {
Attribute fmx = ensureFamixEntity(Attribute.class, key, name, persistIt);
fmx.setParentType((TWithAttributes) owner);
fmx.setParentType( owner);
fmx.setDeclaredType(type);
return fmx;
}
Expand Down Expand Up @@ -848,7 +848,7 @@ public org.moosetechnology.model.famixjava.famixjavaentities.Class ensureFamixCl
return fmx;
}

public Type searchTypeInContext(String name, ContainerEntity ctxt) {
public <T extends TNamedEntity & TWithTypes> Type searchTypeInContext(String name, T ctxt) {
if (ctxt == null) {
return null;
}
Expand Down
Loading