Tabnine Logo
SType.getDictionary
Code IndexAdd Tabnine to your IDE (free)

How to use
getDictionary
method
in
org.opensingular.form.SType

Best Java code snippets using org.opensingular.form.SType.getDictionary (Showing top 20 results out of 315)

origin: org.opensingular/singular-form-core

@Override
@Nullable
public final <V> V getAttributeValue(@Nonnull String attributeFullName, @Nullable Class<V> resultClass) {
  return getAttributeValue(getDictionary().getAttributeReferenceOrException(attributeFullName), resultClass);
}
origin: org.opensingular/singular-form-core

@Nullable
final SInstance findAttributeInstance(@Nonnull String fullName) {
  AttrInternalRef ref = getDictionary().getAttributeReferenceOrException(fullName);
  return AttributeValuesManagerForSType.findAttributeInstance(this, ref);
}
origin: org.opensingular/singular-form-core

/**
 * Looks for the best match implementation of the aspect being request.
 * <p>To understand the registration and retrieval process see {@link AspectRef}.</p>
 */
@Nonnull
public <T> Optional<T> getAspect(@Nonnull AspectRef<T> aspectRef) {
  return getDictionary().getMasterAspectRegistry().getAspect(this, aspectRef);
}
origin: org.opensingular/singular-form-core

  @Override
  @Nonnull
  protected SType<?> retrieve() {
    return RefType.this.get().getDictionary().getType(typeClass);
  }
};
origin: org.opensingular/singular-form-core

@Override
public final boolean hasAttributeValueDirectly(@Nonnull AtrRef<?, ?, ?> atr) {
  AttrInternalRef ref = getDictionary().getAttributeReferenceOrException(atr);
  return AttributeValuesManager.staticGetAttributeDirectly(attributes, ref) != null;
}
origin: org.opensingular/singular-form-core

@Override
public boolean hasAttributeDefinedDirectly(@Nonnull AtrRef<?, ?, ?> atr) {
  AttrInternalRef ref = getDictionary().getAttributeReferenceOrException(atr);
  return getAttributeDefinedLocally(ref) != null;
}
origin: org.opensingular/form-core

  @Override
  @Nonnull
  protected SType<?> retrieve() {
    return RefType.this.get().getDictionary().getType(typeClass);
  }
};
origin: org.opensingular/singular-form-core

@SuppressWarnings("unchecked")
static <I extends SInstance> SIList<I> of(SType<I> elementsType) {
  SDictionary dictionary = elementsType.getDictionary();
  STypeList<?, ?> type = dictionary.getType(STypeList.class);
  SIList<I> list = (SIList<I>) type.newInstance();
  list.elementsType = elementsType;
  return list;
}
origin: org.opensingular/form-core

@SuppressWarnings("unchecked")
static <I extends SInstance> SIList<I> of(SType<I> elementsType) {
  SIList<I> lista = (SIList<I>) elementsType.getDictionary().getType(STypeList.class).newInstance();
  lista.setType(elementsType.getDictionary().getType(STypeList.class));
  lista.elementsType = elementsType;
  return lista;
}
origin: org.opensingular/singular-form-core

@Nullable
public final <V> V getAttributeValue(@Nonnull AtrRef<?, ?, V> atr) {
  return getAttributeValue(getDictionary().getAttributeReferenceOrException(atr), atr.getValueClass());
}
origin: org.opensingular/singular-form-core

/**
 * Verifica se o tipo e seu tipos internos (se existirem) extendem corretamente o tipo informado. Faz uma analise
 * recursiva para os subtipos.
 */
public AssertionsSType isExtensionCorrect(Class<? extends SType> typeClass) {
  return isExtensionCorrect(getTarget().getDictionary().getType(typeClass));
}
origin: org.opensingular/singular-form-core

@Nonnull
final <T extends SType<?>> T extendType(@Nullable SimpleName simpleNameNewType, @Nonnull T parentType) {
  if (getDictionary() != parentType.getDictionary()) {
    throw new SingularFormException(
        "O tipo " + parentType.getName() + " foi criado dentro de outro dicionário, que não o atual de " + getName());
  }
  T newType = parentType.extend(simpleNameNewType);
  return registerTypeInternal(newType, null);
}
origin: org.opensingular/singular-form-core

final SInstance newAttributeInstanceFor(SType<?> typeToBeAppliedAttribute) {
  checkIfIsAttribute();
  SInstance attrInstance;
  if (attrInternalRef.isSelfReference()) {
    attrInstance = typeToBeAppliedAttribute.newInstance(getDictionary().getInternalDicionaryDocument());
  } else {
    attrInstance = newInstance(getDictionary().getInternalDicionaryDocument());
  }
  attrInstance.setAsAttribute(attrInternalRef, typeToBeAppliedAttribute);
  return attrInstance;
}
origin: org.opensingular/singular-form-wicket

/**
 * This method create a predicate for verify if the instance have a element with the sortableProperty.
 * <p>Note: This verify with the name of the Stype.
 *
 * @return Predicate verify if have a Stype with the <code>sortableProperty</code> for a SIntance.
 */
private Predicate<SInstance> isCurrentSortInstance() {
  return i -> i.getType().isTypeOf(i.getType().getDictionary().getType(sortableProperty))
    || SFormUtil.findChildByName(i, sortableProperty).isPresent();
}
origin: org.opensingular/form-core

final SInstance newAttributeInstanceFor(SType<?> typeToBeAppliedAttribute) {
  checkIfIsAttribute();
  SInstance attrInstance;
  if (attributeDefinitionInfo.isSelfReference()) {
    attrInstance = typeToBeAppliedAttribute.newInstance(getDictionary().getInternalDicionaryDocument());
  } else {
    attrInstance = newInstance(getDictionary().getInternalDicionaryDocument());
  }
  attrInstance.setAsAttribute(getName(), this);
  return attrInstance;
}
origin: org.opensingular/singular-form-core

/**
 * Verifica se o tipo encontrado no caminho indicado é uma extensão direta do tipo informado. Para ser considerado
 * uma extensão direta, deverá ser da mesma classe do tipo (não pode ser derivado) e seu super tipo {@link
 * SType#getSuperType()} deve ser igual o tipo registrado no dicionário.
 */
public AssertionsSType isDirectExtensionOf(Class<? extends SType<?>> typeClass, String fieldPath) {
  SType<?> expectedSuperType = getTarget().getDictionary().getType(typeClass);
  if (fieldPath != null) {
    expectedSuperType = expectedSuperType.getLocalType(fieldPath);
  }
  return isDirectExtensionOf(expectedSuperType);
}
origin: org.opensingular/singular-form-core

public SType<?> tableContext(SType<?> type) {
  SType<?> result = type;
  while (table(result) == null && !result.getParentScope().equals(result.getPackage())) {
    result = result.getDictionary().getType(result.getParentScope().getName());
  }
  return result;
}
origin: org.opensingular/singular-form-core

public static SIPersistenceArchive toArchive(SType<?> type) {
  ContextArchive ctx = new ContextArchive(type.getDictionary());
  ctx.getArchive().setRootTypeName(type.getName());
  ensureType(ctx, type);
  return ctx.getArchive();
}
origin: org.opensingular/form-core

public static SIPersistenceArchive toArchive(SType<?> type) {
  ContextArchive ctx = new ContextArchive(type.getDictionary());
  ctx.getArchive().setRootTypeName(type.getName());
  ensureType(ctx, type);
  return ctx.getArchive();
}
origin: org.opensingular/form-core

final <T extends SType<?>> T extendType(String simpleNameNewType, T parentType) {
  if (getDictionary() != parentType.getDictionary()) {
    throw new SingularFormException(
        "O tipo " + parentType.getName() + " foi criado dentro de outro dicionário, que não o atual de " + getName());
  }
  T newType = parentType.extend(simpleNameNewType);
  return registerType(newType, null);
}
org.opensingular.formSTypegetDictionary

Popular methods of SType

  • asAtr
  • getNameSimple
  • getName
  • asAtrProvider
  • getAttributeValue
  • isList
    Verificar se o tipo é um tipo lista ( STypeList).
  • getValidators
  • withView
  • asAtrBootstrap
  • getInstanceClass
  • isComposite
    Verificar se o tipo é um tipo composto ( STypeComposite).
  • getDependentTypes
  • isComposite,
  • getDependentTypes,
  • hasAttributeDefinedInHierarchy,
  • isDependentType,
  • isTypeOf,
  • newInstance,
  • addAttribute,
  • addDependentType,
  • addInstanceValidator

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • 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