@Test public void getQualifiedName() { TurinFile turinFile = new TurinFile(); NamespaceDefinition namespace = new NamespaceDefinition("me.tomassetti"); turinFile.setNameSpace(namespace); TurinTypeDefinition typeDefinition = new TurinTypeDefinition("MyType"); turinFile.add(typeDefinition); assertEquals("me.tomassetti.MyType", typeDefinition.getQualifiedName()); }
public String getQualifiedName() { String contextName = contextName(); if (contextName.isEmpty()) { return name; } else { return contextName + "." + name; } }
TurinTypeDefinition extends TypeDefinitionNode { public String getQualifiedName() { String contextName = contextName(); if (contextName.isEmpty()) { return name; } else { return contextName + "." + name; } } }
TurinTypeDefinition extends TypeDefinitionNode { public String getQualifiedName() { String contextName = contextName(); if (contextName.isEmpty()) { return name; } else { return contextName + "." + name; } } TurinTypeDefinition(String name); }
TurinTypeDefinition extends TypeDefinitionNode { public String getQualifiedName() { String contextName = contextName(); if (contextName.isEmpty()) { return name; } else { return contextName + "." + name; } } TurinTypeDefinition(String name); List<TurinTypeContructorDefinitionNode> getExplicitConstructors(); void setBaseType(TypeUsageNode baseType); void addInterface(TypeUsageNode interfaze); void addAnnotation(AnnotationUsage annotation); String getQualifiedName(); List<InternalConstructorDefinition> getConstructors(); InternalConstructorDefinition getOnlyConstructor(SymbolResolver resolver); @Override JvmMethodDefinition findMethodFor(String methodName, List<JvmType> actualParams, boolean staticContext); void add(PropertyDefinition propertyDefinition); List<Property> assignableProperties(SymbolResolver resolver); List<Property> propertiesAppearingInDefaultConstructor(SymbolResolver resolver); List<Property> defaultPropeties(SymbolResolver resolver); boolean hasDefaultProperties(SymbolResolver resolver); @Override JvmConstructorDefinition resolveConstructorCall(List<ActualParam> actualParams); @Override TypeUsageNode getFieldType(String fieldName, boolean staticContext); @Override List<ReferenceTypeUsage> getAllAncestors(); @Override boolean isInterface(); @Override boolean isClass(); @Override Optional<InternalMethodDefinition> findMethod(String methodName, List<ActualParam> actualParams,boolean staticContext); @Override boolean hasField(String name, boolean staticContext); void add(PropertyReference propertyReference); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override Optional<Symbol> findSymbol(String name, SymbolResolver resolver); boolean defineMethodToString(SymbolResolver resolver); boolean defineMethodHashCode(SymbolResolver resolver); boolean defineMethodEquals(SymbolResolver resolver); List<AnnotationUsage> getAnnotations(); @Override Iterable<Node> getChildren(); List<Property> getDirectProperties(SymbolResolver resolver); List<TurinTypeMethodDefinitionNode> getDirectMethods(); List<TypeUsageNode> getInterfaces(); Optional<TypeUsageNode> getBaseType(); List<Property> getAllProperties(SymbolResolver resolver); void add(TurinTypeMethodDefinitionNode methodDefinition); void add(TurinTypeContructorDefinitionNode contructorDefinition); @Override boolean canFieldBeAssigned(String field); boolean defineExplicitConstructor(SymbolResolver resolver); @Override TypeDefinition getSuperclass(); @Override Map<String, TypeUsage> associatedTypeParametersToName(List<T> typeParams); @Override Optional<InternalConstructorDefinition> findConstructor(List<ActualParam> actualParams); @Override Optional<Invokable> getMethod(String method, boolean staticContext, Map<String, TypeUsage> typeParams); }
TurinTypeDefinition extends TypeDefinitionNode { public String getQualifiedName() { String contextName = contextName(); if (contextName.isEmpty()) { return name; } else { return contextName + "." + name; } } TurinTypeDefinition(String name); List<TurinTypeContructorDefinitionNode> getExplicitConstructors(); void setBaseType(TypeUsageNode baseType); void addInterface(TypeUsageNode interfaze); void addAnnotation(AnnotationUsage annotation); String getQualifiedName(); List<InternalConstructorDefinition> getConstructors(); InternalConstructorDefinition getOnlyConstructor(SymbolResolver resolver); @Override JvmMethodDefinition findMethodFor(String methodName, List<JvmType> actualParams, boolean staticContext); void add(PropertyDefinition propertyDefinition); List<Property> assignableProperties(SymbolResolver resolver); List<Property> propertiesAppearingInDefaultConstructor(SymbolResolver resolver); List<Property> defaultPropeties(SymbolResolver resolver); boolean hasDefaultProperties(SymbolResolver resolver); @Override JvmConstructorDefinition resolveConstructorCall(List<ActualParam> actualParams); @Override TypeUsageNode getFieldType(String fieldName, boolean staticContext); @Override List<ReferenceTypeUsage> getAllAncestors(); @Override boolean isInterface(); @Override boolean isClass(); @Override Optional<InternalMethodDefinition> findMethod(String methodName, List<ActualParam> actualParams,boolean staticContext); @Override boolean hasField(String name, boolean staticContext); void add(PropertyReference propertyReference); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override Optional<Symbol> findSymbol(String name, SymbolResolver resolver); boolean defineMethodToString(SymbolResolver resolver); boolean defineMethodHashCode(SymbolResolver resolver); boolean defineMethodEquals(SymbolResolver resolver); List<AnnotationUsage> getAnnotations(); @Override Iterable<Node> getChildren(); List<Property> getDirectProperties(SymbolResolver resolver); List<TurinTypeMethodDefinitionNode> getDirectMethods(); List<TypeUsageNode> getInterfaces(); Optional<TypeUsageNode> getBaseType(); List<Property> getAllProperties(SymbolResolver resolver); void add(TurinTypeMethodDefinitionNode methodDefinition); void add(TurinTypeContructorDefinitionNode contructorDefinition); @Override boolean canFieldBeAssigned(String field); boolean defineExplicitConstructor(SymbolResolver resolver); @Override TypeDefinition getSuperclass(); @Override Map<String, TypeUsage> associatedTypeParametersToName(List<T> typeParams); @Override Optional<InternalConstructorDefinition> findConstructor(List<ActualParam> actualParams); @Override Optional<Invokable> getMethod(String method, boolean staticContext, Map<String, TypeUsage> typeParams);  }