private void annotationHeader(JavaMessageBuilder builder)
throws ObjectStoreConfigException {
String pkg = builder.getPackageName(this.getURI());
String simple = builder.getSimpleName(this.getURI());
if (pkg == null) {
builder.imports(simple);
} else {
builder.pkg(pkg);
builder.imports(pkg + '.' + simple);
}
builder.comment(this);
if (this.isA(OWL.DEPRECATEDPROPERTY)) {
builder.annotate(Deprecated.class);
}
builder.annotateEnum(Retention.class, "value", RetentionPolicy.class, "RUNTIME");
builder.annotateEnums(Target.class, "value", ElementType.class, "TYPE", "METHOD",
"PARAMETER", "ANNOTATION_TYPE", "PACKAGE");
builder.annotationName(simple);
builder.annotationProperties(this);
builder.annotateURI(Iri.class, "value", builder.getType(this.getURI()));
if (this.isA(OWL.FUNCTIONALPROPERTY)) {
builder.method("value", true).returnType(builder.imports(String.class)).end();
} else {
builder.method("value", true).returnType(builder.imports(String.class) + "[]")
.end();
}
}
RDFProperty.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:anno4j
作者:
评论列表
文章目录