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

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

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

origin: sundrio/sundrio

  public static void visitParents(TypeDef type, List<TypeDef> types, List<TypeDef> visited) {
    if (type == null || JAVA_LANG_OBJECT.equals(type.getFullyQualifiedName())) {
      return;
    }

    if (visited.contains(type)) {
      return;
    }

    visited.add(type);
    List<TypeRef> allRefs = new ArrayList<>();
    allRefs.addAll(type.getImplementsList());
    allRefs.addAll(type.getExtendsList());
    for (TypeRef ref : allRefs) {
      TypeDef parent = DefinitionRepository.getRepository().getDefinition(ref);
      visitParents(parent, types, visited);
    }
    types.add(type);
  }
}
origin: sundrio/sundrio

public boolean isAssignableFrom(TypeDef o) {
  if (this == o || this.equals(o)) {
    return true;
  }
  if (packageName == null && "java.lang".equals(o.packageName) && name.equalsIgnoreCase(o.name)) {
    return true;
  }
  if (o.packageName == null && "java.lang".equals(packageName) && name.equalsIgnoreCase(o.name)) {
    return true;
  }
  for (ClassRef e : o.getExtendsList()) {
    if (isAssignableFrom(e.getDefinition())) {
      return true;
    }
  }
  for (ClassRef i : o.getImplementsList()) {
    if (isAssignableFrom(i.getDefinition())) {
      return true;
    }
  }
  return false;
}
origin: sundrio/sundrio

/**
 * Checks if a {@link TypeDef} is an instance of an other {@link TypeDef}.
 * @param type          The type to compare.
 * @param targetType    The target type.
 * @param function
 * @return  true if match, false otherwise.
 */
public static boolean isInstanceOf(TypeRef type, TypeDef targetType, Function<TypeRef, Boolean> function) {
  if (type instanceof ClassRef) {
    ClassRef classRef = (ClassRef) type;
    TypeDef definition = classRef.getDefinition();
    if (definition.getFullyQualifiedName().equals(targetType.getFullyQualifiedName())) {
      return true;
    }
    for (TypeRef i : definition.getImplementsList()) {
      if (function.apply(i)) {
        return true;
      }
    }
    for (TypeRef e : definition.getExtendsList()) {
      if (function.apply(e)) {
        return true;
      }
    }
  }
  return false;
}
origin: sundrio/sundrio

for (ClassRef n : nestedType.getImplementsList()) {
  nestedInterfaces.add(n);
origin: sundrio/sundrio

for (ClassRef n : nestedType.getImplementsList()) {
  nestedInterfaces.add(n);
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.modelTypeDefgetImplementsList

Popular methods of TypeDef

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

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top plugins for Android Studio
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