本文整理匯總了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();