Tabnine Logo
TypeDef.getProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
getProperties
method
in
io.sundr.codegen.model.TypeDef

Best Java code snippets using io.sundr.codegen.model.TypeDef.getProperties (Showing top 12 results out of 315)

origin: sundrio/sundrio

/**
 * All properties (including inherited).
 * @param typeDef   The type.
 * @return          A list with all properties.
 */
public static List<Property> allProperties(TypeDef typeDef) {
  return unrollHierarchy(typeDef)
      .stream()
      .flatMap(h -> h.getProperties().stream())
      .collect(Collectors.toList());
}
origin: sundrio/sundrio

/**
 * Checks if property exists on the specified type.
 * @param typeDef   The type.
 * @param property  The property name.
 * @return          True if method is found, false otherwise.
 */
public static boolean hasProperty(TypeDef typeDef, String property) {
  return unrollHierarchy(typeDef)
  .stream()
  .flatMap(h -> h.getProperties().stream())
  .filter(p -> property.equals(p.getName()))
  .findAny()
  .isPresent();
}
origin: sundrio/sundrio

public static Set<String> allGenericsOf(TypeDef clazz) {
  Set<String> result = new HashSet<String>();
  for (TypeParamDef paramDef : clazz.getParameters()) {
    result.add(paramDef.getName());
  }
  for (Property property : clazz.getProperties()) {
    result.addAll(allGenericsOf(property));
  }
  for (Method method : clazz.getMethods()) {
    result.addAll(allGenericsOf(method));
  }
  return result;
}
origin: sundrio/sundrio

for (Property property : target.getProperties()) {
  if (!hasBuildableConstructorWithArgument(target, property) && Setter.has(target, property)) {
    String withName = "with" + property.getNameCapitalized();
origin: sundrio/sundrio

for (Property property : c.getProperties()) {
  if (!hasBuildableConstructorWithArgument(c, property) && Setter.has(c, property)) {
    String setterName = "set" + property.getNameCapitalized();
origin: sundrio/sundrio

if (m.getReturnType() instanceof ClassRef)  {
  ClassRef ref = (ClassRef) m.getReturnType();
  Boolean hasSuperClass = pojo.getProperties()
  .stream()
  .filter(p -> p.getTypeRef() instanceof ClassRef && p.getName().equals(Getter.propertyNameSafe(m)))
origin: sundrio/sundrio

  public TypeDef apply(TypeDef... items) {
    if (items == null || items.length == 0) {
      throw new IllegalArgumentException("Items cannot be empty.");
    } else if (items.length == 1) {
      return items[0];
    } else if (items.length == 2) {
      TypeDef mergedType = TYPES.apply(new TypeDef[]{items[0], items[1]});
      TypeDefBuilder builder = new TypeDefBuilder(mergedType);
      for (Method constructor : items[1].getConstructors()) {
        builder = builder.addToConstructors(constructor);
      }
      for (Method method : items[1].getMethods()) {
        builder = builder.addToMethods(method);
      }
      for (Property property : items[1].getProperties()) {
        builder = builder.addToProperties(property);
      }
      return builder.build();
    } else {
      TypeDef[] rest = new TypeDef[items.length - 1];
      System.arraycopy(items, 1, rest, 0, rest.length);
      CLASSES.apply(new TypeDef[]{items[0], CLASSES.apply(rest)});
    }
    return null;
  }
};
origin: sundrio/sundrio

for (Property property : item.getProperties()) {
  final TypeRef unwrapped = TypeAs.combine(TypeAs.UNWRAP_ARRAY_OF, TypeAs.UNWRAP_COLLECTION_OF, TypeAs.UNWRAP_OPTIONAL_OF).apply(property.getTypeRef());
  if (property.isStatic()) {
origin: sundrio/sundrio

constructors.add(instanceConstructor);
for (final Property property : item.getProperties()) {
  final TypeRef unwrapped = TypeAs.combine(TypeAs.UNWRAP_ARRAY_OF, TypeAs.UNWRAP_COLLECTION_OF, TypeAs.UNWRAP_OPTIONAL_OF).apply(property.getTypeRef());
origin: sundrio/sundrio

public TypeDefFluentImpl(TypeDef instance){
    this.withKind(instance.getKind()); 
    this.withPackageName(instance.getPackageName()); 
    this.withName(instance.getName()); 
    this.withComments(instance.getComments()); 
    this.withAnnotations(instance.getAnnotations()); 
    this.withExtendsList(instance.getExtendsList()); 
    this.withImplementsList(instance.getImplementsList()); 
    this.withParameters(instance.getParameters()); 
    this.withProperties(instance.getProperties()); 
    this.withConstructors(instance.getConstructors()); 
    this.withMethods(instance.getMethods()); 
    this.withOuterType(instance.getOuterType()); 
    this.withInnerTypes(instance.getInnerTypes()); 
    this.withModifiers(instance.getModifiers()); 
    this.withAttributes(instance.getAttributes()); 
}
origin: sundrio/sundrio

public TypeDefBuilder(TypeDef instance,Boolean validationEnabled){
    this.fluent = this; 
    this.withKind(instance.getKind()); 
    this.withPackageName(instance.getPackageName()); 
    this.withName(instance.getName()); 
    this.withComments(instance.getComments()); 
    this.withAnnotations(instance.getAnnotations()); 
    this.withExtendsList(instance.getExtendsList()); 
    this.withImplementsList(instance.getImplementsList()); 
    this.withParameters(instance.getParameters()); 
    this.withProperties(instance.getProperties()); 
    this.withConstructors(instance.getConstructors()); 
    this.withMethods(instance.getMethods()); 
    this.withOuterType(instance.getOuterType()); 
    this.withInnerTypes(instance.getInnerTypes()); 
    this.withModifiers(instance.getModifiers()); 
    this.withAttributes(instance.getAttributes()); 
    this.validationEnabled = validationEnabled; 
}
origin: sundrio/sundrio

public TypeDefBuilder(TypeDefFluent<?> fluent,TypeDef instance,Boolean validationEnabled){
    this.fluent = fluent; 
    fluent.withKind(instance.getKind()); 
    fluent.withPackageName(instance.getPackageName()); 
    fluent.withName(instance.getName()); 
    fluent.withComments(instance.getComments()); 
    fluent.withAnnotations(instance.getAnnotations()); 
    fluent.withExtendsList(instance.getExtendsList()); 
    fluent.withImplementsList(instance.getImplementsList()); 
    fluent.withParameters(instance.getParameters()); 
    fluent.withProperties(instance.getProperties()); 
    fluent.withConstructors(instance.getConstructors()); 
    fluent.withMethods(instance.getMethods()); 
    fluent.withOuterType(instance.getOuterType()); 
    fluent.withInnerTypes(instance.getInnerTypes()); 
    fluent.withModifiers(instance.getModifiers()); 
    fluent.withAttributes(instance.getAttributes()); 
    this.validationEnabled = validationEnabled; 
}
public TypeDefBuilder(TypeDef instance){
io.sundr.codegen.modelTypeDefgetProperties

Popular methods of TypeDef

  • getFullyQualifiedName
    Returns the fully qualified name of the type.
  • getName
  • getPackageName
  • equals
  • getAttributes
  • getConstructors
  • getExtendsList
  • getMethods
  • getParameters
  • toInternalReference
    Creates a ClassRef for internal use inside the scope of the type (methods, properties etc). It uses
  • toReference
  • getAnnotations
  • toReference,
  • getAnnotations,
  • getAttribute,
  • getImplementsList,
  • getKind,
  • hasAttribute,
  • isAbstract,
  • isAssignableFrom,
  • toUnboundedReference

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JOptionPane (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