public class MethodNameBuilder extends IdentifierBuilder
| Modifier and Type | Method and Description |
|---|---|
static MethodNameBuilder |
forObjectRepository(ObjectConnection connection)
Returns a builder object that operates on the connected repository.
|
static MethodNameBuilder |
forObjectRepository(ObjectRepository repository)
Returns a builder object that operates on the given repository.
|
com.squareup.javapoet.MethodSpec |
getJavaPoetMethodSpec(String prefix,
ResourceObject resource,
OntGenerationConfig config,
boolean pluralName)
Returns a JavaPoet
MethodSpec object for a property described by the builders resource. |
capitalizedIdentifier, capitalizedPluralIdentifier, lowercaseIdentifier, lowercasePluralIdentifier, packageNamepublic static MethodNameBuilder forObjectRepository(ObjectRepository repository) throws org.openrdf.repository.RepositoryException
repository - The repository to use, e.g. for name disambiguation.org.openrdf.repository.RepositoryException - Thrown if an error occurs while opening a connection to the repository.public static MethodNameBuilder forObjectRepository(ObjectConnection connection)
connection - A connection to the repository to use, e.g. for name disambiguation.public com.squareup.javapoet.MethodSpec getJavaPoetMethodSpec(String prefix, ResourceObject resource, OntGenerationConfig config, boolean pluralName) throws org.openrdf.repository.RepositoryException
MethodSpec object for a property described by the builders resource.
Only the name of the method is set in the method specification, i.e. this is a equivalent to
MethodSpec.methodBuilder(prefix + ci).build();, where
ci is a capitalized identifier for the resource.
The generation of the methods name if preferably done on basis of the RDFS label set.
If it is not possible to derive a meaningful name, then an unambiguous name is picked.prefix - The part preceding the properties name in the method name, e.g. "set", "addAll", ...resource - The property resource for which to generate a (name-only) method specification.config - The configuration according to which to chose the name.pluralName - Whether a plural form should be picked for the methods name.MethodSpec object for a method for the resource.org.openrdf.repository.RepositoryException - Thrown if an error occurs while querying the repository.Copyright © 2017 Chair of Distributed Information Systems - University of Passau. All rights reserved.