/
JavaSourceFileModel.java
49 lines (41 loc) · 1.59 KB
/
JavaSourceFileModel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package org.jboss.windup.rules.apps.java.model;
import org.jboss.windup.graph.model.resource.FileModel;
import org.jboss.windup.graph.model.resource.SourceFileModel;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.frames.Adjacency;
import com.tinkerpop.frames.Property;
import com.tinkerpop.frames.modules.typedgraph.TypeValue;
/**
* Represents a source ".java" file on disk.
*
* @author jsightler <jesse.sightler@gmail.com>
*/
@TypeValue(JavaSourceFileModel.TYPE)
public interface JavaSourceFileModel extends FileModel, SourceFileModel
{
public static final String UNPARSEABLE_JAVA_CLASSIFICATION = "Unparseable Java File";
public static final String UNPARSEABLE_JAVA_DESCRIPTION = "This Java file could not be parsed";
public static final String TYPE = "JavaSourceFileModel";
public static final String PACKAGE_NAME = "packageName";
public static final String JAVA_CLASS_MODEL = "javaClass";
/**
* Contains the Java package name
*/
@Property(PACKAGE_NAME)
public String getPackageName();
/**
* Contains the Java package name
*/
@Property(PACKAGE_NAME)
public void setPackageName(String packageName);
/**
* Lists the {@link JavaClassModel}s contained within this source file
*/
@Adjacency(label = JAVA_CLASS_MODEL, direction = Direction.OUT)
public Iterable<JavaClassModel> getJavaClasses();
/**
* Lists the {@link JavaClassModel}s contained within this source file
*/
@Adjacency(label = JAVA_CLASS_MODEL, direction = Direction.OUT)
public void addJavaClass(JavaClassModel javaClassModel);
}