|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.force.sdk.codegen.builder.BaseBuilder<Class<? extends Annotation>>
com.force.sdk.codegen.builder.JPAAnnotationBuilder
public class JPAAnnotationBuilder
Builds JPA annotation String
s that can be included in generated source code.
JPAAnnotationBuilder
takes in Annotation
classes and converts those
into String
s that can be added to Java source code.
Built annotations will be in the form:
@<annotationName>
Field Summary |
---|
Fields inherited from class com.force.sdk.codegen.builder.BaseBuilder |
---|
builderString |
Constructor Summary | |
---|---|
JPAAnnotationBuilder(int numIndents)
Initializes a JPAAnnotationBuilder with the number
of intentions that should proceed each annotation. |
Method Summary | |
---|---|
void |
add(Class<? extends Annotation> annotation,
Map<String,String> attrs)
Adds an annotation with attributes to this JPAAnnotationBuilder . |
Methods inherited from class com.force.sdk.codegen.builder.BaseBuilder |
---|
add, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JPAAnnotationBuilder(int numIndents)
JPAAnnotationBuilder
with the number
of intentions that should proceed each annotation.
numIndents
- the number of indentations that should
proceed each annotationMethod Detail |
---|
public void add(Class<? extends Annotation> annotation, Map<String,String> attrs)
JPAAnnotationBuilder
.
Note that the attributes map has String
values. This method
will exactly copy the attribute map values into the annotation attribute
list. Therefore callers must exactly write the attribute values as they
appear in String
form. For example, to add the attribute name="FooBar"
the caller would do the following:
map.put("name", "\"FooBar\"")
Annotations with attributes will be built in the form:
@<annotationName>(<attr1>=<attr1Value>,<attr2>=<attr2Value>,...)
annotation
- a subclass of Annotation
that represents the annotation
that is to be added to this builderattrs
- a java.util.Map
of attribute keys and values in String
form
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |