本文整理汇总了Java中org.jboss.forge.roaster.model.Visibility类的典型用法代码示例。如果您正苦于以下问题:Java Visibility类的具体用法?Java Visibility怎么用?Java Visibility使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Visibility类属于org.jboss.forge.roaster.model包,在下文中一共展示了Visibility类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deserialize
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Visibility deserialize(@Nonnull JsonParser jsonParser, @Nonnull DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
String name = jsonParser.getText().toUpperCase();
if ("PACKAGE-PRIVATE".equals(name)) {
return Visibility.PACKAGE_PRIVATE;
}
return Visibility.valueOf(name);
}
示例2: TransformationType
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@JsonCreator
private TransformationType(@Nullable @JsonProperty("visibility") Visibility visibility, @Nullable @JsonProperty("fields") Map<String, Visibility> fields, @Nullable @JsonProperty("methods") Map<String, Visibility> methods) {
if (fields == null) {
fields = new HashMap<>();
}
if (methods == null) {
methods = new HashMap<>();
}
this.visibility = visibility;
this.fields = fields;
this.methods = methods;
}
示例3: read
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
* Reads an access transformation map from a supplied path.
*
* @throws IOException when accessing the file fails.
*/
@Nonnull
public static AccessTransformationMap read(@Nonnull Path path) throws IOException {
ObjectMapper mapper = new ObjectMapper();
{
SimpleModule module = new SimpleModule("Access Transformation Serialization");
module.addDeserializer(Visibility.class, new VisibilityJsonDeserializer());
mapper.registerModule(module);
}
try (FileInputStream inputStream = new FileInputStream(path.toFile())) {
return mapper.readValue(inputStream, AccessTransformationMap.class);
}
}
示例4: setVisibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Object setVisibility(Visibility scope) {
return null;
}
示例5: getVisibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility getVisibility() {
return null;
}
示例6: setVisibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public MethodSource<JavaClassSource> setVisibility(Visibility visibility) {
return null;
}
示例7: visibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility visibility() {
return PUBLIC;
}
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:5,代码来源:MapperTesterShouldTestAllParamsMethod.java
示例8: visibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility visibility() {
return PRIVATE;
}
示例9: visibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility visibility() {
return Visibility.PUBLIC;
}
示例10: shouldBeAPublicMethod
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Test
public void shouldBeAPublicMethod() {
assertEquals(Visibility.PUBLIC, method.visibility());
}
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:5,代码来源:MapperTesterShouldTestAllParamsMethodTest.java
示例11: shouldBeAPublicField
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Test
public void shouldBeAPublicField() {
assertEquals(Visibility.PRIVATE, field.visibility());
}
示例12: getFieldVisibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
* Retrieves the altered visibility for a field of a specific name (if any).
*/
@Nonnull
public Optional<Visibility> getFieldVisibility(@Nonnull String fieldName) {
return Optional.ofNullable(this.fields.get(fieldName));
}
示例13: getMethodVisibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
* Retrieves the altered visibility for a method of a specific name (if any).
*/
@Nonnull
public Optional<Visibility> getMethodVisibility(@Nonnull String methodName) {
return Optional.ofNullable(this.methods.get(methodName));
}
示例14: getVisibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
* Retrieves the type visibility.
*/
@Nonnull
public Optional<Visibility> getVisibility() {
return Optional.ofNullable(this.visibility);
}
示例15: visibility
import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
Visibility visibility();