Tabnine Logo
Property.setSource
Code IndexAdd Tabnine to your IDE (free)

How to use
setSource
method
in
org.fabric3.api.model.type.component.Property

Best Java code snippets using org.fabric3.api.model.type.component.Property.setSource (Showing top 2 results out of 315)

origin: com.carecon.fabric3/fabric3-introspection-java

private void processSource(Class<?> type, Class<?> clazz, Property property, IntrospectionContext context) {
  Source source = type.getAnnotation(Source.class);
  if (source != null) {
    if (!source.value().startsWith("$")) {
      InvalidAnnotation error = new InvalidAnnotation("Source attribute must specify an expression starting with '$' on:" + type,
                              type,
                              source,
                              clazz);
      context.addError(error);
    } else {
      property.setSource(source.value());
    }
  }
}
origin: com.carecon.fabric3/fabric3-introspection-java

private void processSource(AccessibleObject accessible, Class<?> clazz, Property property, IntrospectionContext context) {
  Source source = accessible.getAnnotation(Source.class);
  if (source != null) {
    if (!source.value().startsWith("$")) {
      InvalidAnnotation error = new InvalidAnnotation("Source attribute must specify an expression starting with '$' on:" + accessible,
                              accessible,
                              source,
                              clazz);
      context.addError(error);
    } else {
      property.setSource(source.value());
      // handle defined namespaces
      Component componentAnnotation = clazz.getAnnotation(Component.class);
      if (componentAnnotation != null) {
        Namespace[] namespaces = componentAnnotation.namespaces();
        for (Namespace namespace : namespaces) {
          String prefix = namespace.prefix();
          String uri = namespace.uri();
          property.addNamespace(prefix, uri);
        }
      }
    }
  }
}
org.fabric3.api.model.type.componentPropertysetSource

Javadoc

Sets the property source

Popular methods of Property

  • <init>
  • getName
    Returns the name of the property.
  • getType
    Returns the property XSD type or null if it is not an XSD type.
  • setMany
    Sets whether the property is many-valued or single-valued.
  • setRequired
    Sets whether the component definition must supply a value for this property.
  • getDefaultValue
    Returns the default property value as a DOM.
  • getNamespaces
  • getSource
    Returns the property source
  • isMany
    Returns whether the property is many-valued or single-valued.
  • isRequired
    Returns whether the component definition must supply a value for this property.
  • setType
    Sets the XSD type
  • addNamespace
    Adds a namespace used to resolve a property source.
  • setType,
  • addNamespace,
  • setDefaultValue,
  • setParent

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JButton (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now